From 0489025cabc62a6cfa5601abdde2cc32001f9a81 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 25 May 2019 15:04:12 +0200 Subject: [PATCH] lvm2: allow building with systemd = null The closure still picks up systemd via udev, however, overriding with eudev is necessary to avoid the reference. --- pkgs/os-specific/linux/lvm2/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/lvm2/default.nix b/pkgs/os-specific/linux/lvm2/default.nix index bf5aa88f5bb..d6522e60e9e 100644 --- a/pkgs/os-specific/linux/lvm2/default.nix +++ b/pkgs/os-specific/linux/lvm2/default.nix @@ -34,11 +34,11 @@ stdenv.mkDerivation { preConfigure = '' - substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \ - --replace /usr/bin/udevadm ${systemd}/bin/udevadm - sed -i /DEFAULT_SYS_DIR/d Makefile.in sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in + '' + stdenv.lib.optionalString (systemd != null) '' + substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \ + --replace /usr/bin/udevadm ${systemd}/bin/udevadm ''; enableParallelBuilding = true; @@ -73,7 +73,7 @@ stdenv.mkDerivation { '' substituteInPlace $out/lib/udev/rules.d/13-dm-disk.rules \ --replace $out/sbin/blkid ${utillinux}/sbin/blkid - + '' + stdenv.lib.optionalString (systemd != null) '' # Systemd stuff mkdir -p $out/etc/systemd/system $out/lib/systemd/system-generators cp scripts/blk_availability_systemd_red_hat.service $out/etc/systemd/system