pkgsStatic.bcachefs-tools: fix build

In pkgsStatic, there is no systemd.pc or udev.pc, so running make
without setting these variables will fail.  There's not really any
reason to only set them for installing anyway — in general it's best
to set variables like this for all phases to minimize the risk of a
mismatch between build and install behaviour.
This commit is contained in:
Alyssa Ross
2025-04-22 15:25:12 +02:00
parent 264d65c519
commit 301e9a34a1
+4 -6
View File
@@ -70,6 +70,10 @@ stdenv.mkDerivation (finalAttrs: {
"PREFIX=${placeholder "out"}"
"VERSION=${finalAttrs.version}"
"INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools"
# Tries to install to the 'systemd-minimal' and 'udev' nix installation paths
"PKGCONFIG_SERVICEDIR=$(out)/lib/systemd/system"
"PKGCONFIG_UDEVDIR=$(out)/lib/udev"
] ++ lib.optional fuseSupport "BCACHEFS_FUSE=1";
env = {
@@ -90,12 +94,6 @@ stdenv.mkDerivation (finalAttrs: {
'';
checkFlags = [ "BCACHEFS_TEST_USE_VALGRIND=no" ];
# Tries to install to the 'systemd-minimal' and 'udev' nix installation paths
installFlags = [
"PKGCONFIG_SERVICEDIR=$(out)/lib/systemd/system"
"PKGCONFIG_UDEVDIR=$(out)/lib/udev"
];
postInstall =
''
substituteInPlace $out/libexec/bcachefsck_all \