diff options
author | Lily Foster <lily@lily.flowers> | 2023-01-10 19:11:21 -0500 |
---|---|---|
committer | Emery Hemingway <ehmry@posteo.net> | 2023-01-16 10:53:16 -0600 |
commit | f46ee73ba6851e458dedc78e3f0fe2c6eb099697 (patch) | |
tree | f9bf388566820cbf33d1368613d39b72f42e9727 | |
parent | 7c1096ab995f8a75b794b1f4ac841ea6caa7a120 (diff) |
dracut: init at 059
-rw-r--r-- | pkgs/os-specific/linux/dracut/default.nix | 128 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 130 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/dracut/default.nix b/pkgs/os-specific/linux/dracut/default.nix new file mode 100644 index 0000000000000..2b483e2c7c768 --- /dev/null +++ b/pkgs/os-specific/linux/dracut/default.nix @@ -0,0 +1,128 @@ +{ stdenv +, lib +, fetchFromGitHub +, gitUpdater +, makeBinaryWrapper +, pkg-config +, asciidoc +, libxslt +, docbook_xsl +, bash +, kmod +, binutils +, busybox +, bzip2 +, coreutils +, cpio +, findutils +, glibc +, gnugrep +, gnused +, gnutar +, gzip +, kbd +, lvm2 +, lz4 +, lzop +, procps +, rng-tools +, squashfsTools +, systemd +, util-linux +, xz +, zstd +}: + +stdenv.mkDerivation rec { + pname = "dracut"; + version = "059"; + + src = fetchFromGitHub { + owner = "dracutdevs"; + repo = "dracut"; + rev = version; + hash = "sha256-zSyC2SnSQkmS/mDpBXG2DtVVanRRI9COKQJqYZZCPJM="; + }; + + strictDeps = true; + + buildInputs = [ + bash + kmod + ]; + + nativeBuildInputs = [ + makeBinaryWrapper + pkg-config + asciidoc + libxslt + docbook_xsl + ]; + + postPatch = '' + substituteInPlace dracut.sh \ + --replace 'dracutbasedir="$dracutsysrootdir"/usr/lib/dracut' 'dracutbasedir="$dracutsysrootdir"'"$out/lib/dracut" + substituteInPlace lsinitrd.sh \ + --replace 'dracutbasedir=/usr/lib/dracut' "dracutbasedir=$out/lib/dracut" + + echo 'DRACUT_VERSION=${version}' >dracut-version.sh + ''; + + preConfigure = '' + patchShebangs ./configure + ''; + + postFixup = '' + wrapProgram $out/bin/dracut --prefix PATH : ${lib.makeBinPath [ + coreutils + util-linux + ]} --prefix DRACUT_PATH : ${lib.makeBinPath [ + bash + binutils + coreutils + findutils + glibc + gnugrep + gnused + gnutar + kbd + lvm2 + procps + rng-tools + squashfsTools + systemd + util-linux + busybox + ]} + wrapProgram $out/bin/dracut-catimages --set PATH ${lib.makeBinPath [ + coreutils + cpio + findutils + gzip + ]} + wrapProgram $out/bin/lsinitrd --set PATH ${lib.makeBinPath [ + binutils + bzip2 + coreutils + cpio + gnused + gzip + lz4 + lzop + squashfsTools + util-linux + xz + zstd + ]} + ''; + + passthru.updateScript = gitUpdater { }; + + meta = with lib; { + homepage = "https://dracut.wiki.kernel.org"; + description = "An event driven initramfs infrastructure"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ lilyinstarlight ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e10f379e887cf..71618a9504e1b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28530,6 +28530,8 @@ with pkgs; dr14_tmeter = callPackage ../applications/audio/dr14_tmeter { }; + dracut = callPackage ../os-specific/linux/dracut { }; + dragonflydb = callPackage ../servers/nosql/dragonflydb { }; dragonfly-reverb = callPackage ../applications/audio/dragonfly-reverb { }; |