Merge pull request #168792 from roblabla/fix-wimlib-darwin

wimlib: Fix build on darwin.
This commit is contained in:
Domen Kožar 2022-04-20 12:22:21 +01:00 committed by GitHub
commit 9268d492f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,20 +19,20 @@ stdenv.mkDerivation rec {
sha256 = "sha256-MvzJ6bFEt8sdtMhuEEyngoPNwiXhP+grJzZgWGrv4yM=";
};
preBuild = ''
preBuild = lib.optionalString (!stdenv.isDarwin) ''
substituteInPlace programs/mkwinpeimg.in \
--replace '/usr/lib/syslinux' "${syslinux}/share/syslinux"
'';
postInstall = let
path = lib.makeBinPath [ cabextract cdrkit mtools ntfs3g syslinux ];
path = lib.makeBinPath ([ cabextract mtools ntfs3g ] ++ lib.optionals (!stdenv.isDarwin) [ cdrkit syslinux ]);
in ''
for prog in $out/bin/*; do
wrapProgram $prog --prefix PATH : ${path}
done
'';
doCheck = true;
doCheck = (!stdenv.isDarwin);
preCheck = ''
patchShebangs tests