Merge pull request #91109 from primeos/bcache-tools-fix-cross-compilation

bcache-tools: Fix the cross compilation
This commit is contained in:
Florian Klink 2020-06-19 23:42:08 +02:00 committed by GitHub
commit 0ee4259ff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
sed -e "/INSTALL.*initramfs\/hook/d" \
-e "/INSTALL.*initcpio\/install/d" \
-e "/INSTALL.*dracut\/module-setup.sh/d" \
-e "s/pkg-config/$PKG_CONFIG/" \
-i Makefile
'';
@ -28,8 +29,12 @@ stdenv.mkDerivation rec {
./fix-static.patch
];
makeFlags = [
"PREFIX=${placeholder "out"}"
"UDEVLIBDIR=${placeholder "out"}/lib/udev/"
];
preBuild = ''
export makeFlags="$makeFlags PREFIX=\"$out\" UDEVLIBDIR=\"$out/lib/udev/\"";
sed -e "s|/bin/sh|${bash}/bin/sh|" -i *.rules
'';