appimagekit: add some fixes (#57591)
* appimagekit: fix usage of `file` so it works on NixOS * appimagekit: copy missing mksquashfs and desktop-file-utils
This commit is contained in:
parent
bc36c24998
commit
7b1d4844d9
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, fetchFromGitHub
|
{ stdenv, fetchFromGitHub
|
||||||
, pkgconfig, cmake, autoconf, automake, libtool
|
, pkgconfig, cmake, autoconf, automake, libtool, makeWrapper
|
||||||
, wget, xxd, desktop-file-utils
|
, wget, xxd, desktop-file-utils, file
|
||||||
, glib, zlib, cairo, openssl, fuse, xz, squashfuse, inotify-tools, libarchive
|
, gnupg, glib, zlib, cairo, openssl, fuse, xz, squashfuse, inotify-tools, libarchive
|
||||||
, squashfsTools
|
, squashfsTools
|
||||||
, gtest
|
, gtest
|
||||||
}:
|
}:
|
||||||
@ -72,9 +72,13 @@ in stdenv.mkDerivation rec {
|
|||||||
buildInputs = [
|
buildInputs = [
|
||||||
glib zlib cairo openssl fuse
|
glib zlib cairo openssl fuse
|
||||||
xz inotify-tools libarchive
|
xz inotify-tools libarchive
|
||||||
squashfsTools
|
squashfsTools makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace src/appimagetool.c --replace "/usr/bin/file" "${file}/bin/file"
|
||||||
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
export HOME=$(pwd)
|
export HOME=$(pwd)
|
||||||
'';
|
'';
|
||||||
@ -90,6 +94,14 @@ in stdenv.mkDerivation rec {
|
|||||||
"-DBUILD_TESTING=${if doCheck then "ON" else "OFF"}"
|
"-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 ];
|
checkInputs = [ gtest ];
|
||||||
doCheck = false; # fails 1 out of 4 tests, I'm too lazy to debug why
|
doCheck = false; # fails 1 out of 4 tests, I'm too lazy to debug why
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user