dracut: init at 059

This commit is contained in:
Lily Foster 2023-01-10 19:11:21 -05:00 committed by Emery Hemingway
parent 7c1096ab99
commit f46ee73ba6
2 changed files with 130 additions and 0 deletions

View File

@ -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;
};
}

View File

@ -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 { };