about summary refs log tree commit diff
path: root/pkgs/tools/package-management
diff options
context:
space:
mode:
authorPedro Pombeiro <PombeirP@users.noreply.github.com>2019-03-23 15:59:10 +0100
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2019-03-23 10:59:10 -0400
commit7b1d4844d9c3f7b256c0047b25416cc001f48dac (patch)
tree4941be1d71d64f04f0a1725e201f7479c87434f8 /pkgs/tools/package-management
parentbc36c24998af38ef974d7788e3fdaf256dcdd9ee (diff)
downloadnixlib-7b1d4844d9c3f7b256c0047b25416cc001f48dac.tar
nixlib-7b1d4844d9c3f7b256c0047b25416cc001f48dac.tar.gz
nixlib-7b1d4844d9c3f7b256c0047b25416cc001f48dac.tar.bz2
nixlib-7b1d4844d9c3f7b256c0047b25416cc001f48dac.tar.lz
nixlib-7b1d4844d9c3f7b256c0047b25416cc001f48dac.tar.xz
nixlib-7b1d4844d9c3f7b256c0047b25416cc001f48dac.tar.zst
nixlib-7b1d4844d9c3f7b256c0047b25416cc001f48dac.zip
appimagekit: add some fixes (#57591)
* appimagekit: fix usage of `file` so it works on NixOS

* appimagekit: copy missing mksquashfs and desktop-file-utils
Diffstat (limited to 'pkgs/tools/package-management')
-rw-r--r--pkgs/tools/package-management/appimagekit/default.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/pkgs/tools/package-management/appimagekit/default.nix b/pkgs/tools/package-management/appimagekit/default.nix
index 2c389c144b1e..b4b339edb5f7 100644
--- a/pkgs/tools/package-management/appimagekit/default.nix
+++ b/pkgs/tools/package-management/appimagekit/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchFromGitHub
-, pkgconfig, cmake, autoconf, automake, libtool
-, wget, xxd, desktop-file-utils
-, glib, zlib, cairo, openssl, fuse, xz, squashfuse, inotify-tools, libarchive
+, pkgconfig, cmake, autoconf, automake, libtool, makeWrapper
+, wget, xxd, desktop-file-utils, file
+, gnupg, glib, zlib, cairo, openssl, fuse, xz, squashfuse, inotify-tools, libarchive
 , squashfsTools
 , gtest
 }:
@@ -72,9 +72,13 @@ in stdenv.mkDerivation rec {
   buildInputs = [
     glib zlib cairo openssl fuse
     xz inotify-tools libarchive
-    squashfsTools
+    squashfsTools makeWrapper
   ];
 
+  postPatch = ''
+    substituteInPlace src/appimagetool.c --replace "/usr/bin/file" "${file}/bin/file"
+  '';
+
   preConfigure = ''
     export HOME=$(pwd)
   '';
@@ -90,6 +94,14 @@ in stdenv.mkDerivation rec {
     "-DBUILD_TESTING=${if doCheck then "ON" else "OFF"}"
   ];
 
+  postInstall = ''
+    cp "${squashfsTools}/bin/mksquashfs" "$out/lib/appimagekit/"
+    cp "${desktop-file-utils}/bin/desktop-file-validate" "$out/bin"
+
+    wrapProgram "$out/bin/appimagetool" \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ file gnupg ]}"
+  '';
+
   checkInputs = [ gtest ];
   doCheck = false; # fails 1 out of 4 tests, I'm too lazy to debug why