lvm2-2_02: fix build (#154041)

2cc29125a722d913a80aaf94c51bdd72219aac07 updated this without taking
account for the older version of the package still around.
This commit is contained in:
Florian Klink 2022-01-09 01:59:29 +01:00 committed by GitHub
parent c33156dc03
commit fb69d7668f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -66,9 +66,13 @@ stdenv.mkDerivation rec {
substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \
--replace /usr/bin/udevadm /run/current-system/systemd/bin/udevadm
# https://github.com/lvmteam/lvm2/issues/36
'' + lib.optionalString (lib.versionOlder version "2.03.14") ''
substituteInPlace udev/69-dm-lvm-metad.rules.in \
--replace "(BINDIR)/systemd-run" /run/current-system/systemd/bin/systemd-run
'' + lib.optionalString (lib.versionAtLeast version "2.03.14") ''
substituteInPlace udev/69-dm-lvm.rules.in \
--replace "/usr/bin/systemd-run" /run/current-system/systemd/bin/systemd-run
'' + ''
substituteInPlace make.tmpl.in --replace "@systemdsystemunitdir@" "$out/lib/systemd/system"
'' + lib.optionalString (lib.versionAtLeast version "2.03") ''
substituteInPlace libdm/make.tmpl.in --replace "@systemdsystemunitdir@" "$out/lib/systemd/system"