lvm2: package 2.02.x for musl

This commit is contained in:
Yureka 2021-10-17 15:46:26 +02:00
parent 49b132183a
commit 2cc29125a7
4 changed files with 21 additions and 5 deletions

View file

@ -0,0 +1,4 @@
import ./common.nix {
version = "2.02.187";
sha256Hash = "sha256-Dg1SGoY6XbJEDy4edie6grcCc65KsLvhMIUdsNWOWvE=";
}

View file

@ -0,0 +1,4 @@
import ./common.nix {
version = "2.03.12";
sha256Hash = "1shczwfd0888dchjiaqzd48ampm6f8y0ngsqd99fy4nxlbr5q1vn";
}

View file

@ -1,3 +1,5 @@
{ version, sha256Hash }:
{ lib, stdenv
, fetchpatch
, fetchurl
@ -15,12 +17,12 @@
assert enableDmeventd -> enableCmdlib;
stdenv.mkDerivation rec {
pname = "lvm2" + lib.optionalString enableDmeventd "with-dmeventd";
version = "2.03.12";
pname = "lvm2" + lib.optionalString enableDmeventd "-with-dmeventd";
inherit version;
src = fetchurl {
url = "https://mirrors.kernel.org/sourceware/lvm2/LVM2.${version}.tgz";
sha256 = "1shczwfd0888dchjiaqzd48ampm6f8y0ngsqd99fy4nxlbr5q1vn";
sha256 = sha256Hash;
};
nativeBuildInputs = [ pkg-config ];
@ -60,6 +62,7 @@ stdenv.mkDerivation rec {
--replace "(BINDIR)/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"
'';

View file

@ -21935,13 +21935,18 @@ with pkgs;
lsscsi = callPackage ../os-specific/linux/lsscsi { };
lvm2 = callPackage ../os-specific/linux/lvm2 {
lvm2-2_03 = callPackage ../os-specific/linux/lvm2/2_03.nix {
# udev is the same package as systemd which depends on cryptsetup
# which depends on lvm2 again. But we only need the libudev part
# which does not depend on cryptsetup.
udev = systemdMinimal;
};
lvm2_dmeventd = callPackage ../os-specific/linux/lvm2 {
lvm2-2_02 = callPackage ../os-specific/linux/lvm2/2_02.nix {
udev = systemdMinimal;
};
lvm2 = if stdenv.targetPlatform.isMusl then lvm2-2_02 else lvm2-2_03;
lvm2_dmeventd = lvm2.override {
enableDmeventd = true;
enableCmdlib = true;
};