Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 110 lines 2.0 kB view raw
1{ stdenv 2, lib 3, fetchFromGitHub 4, gitUpdater 5, makeBinaryWrapper 6, pkg-config 7, asciidoc 8, libxslt 9, docbook_xsl 10, bash 11, kmod 12, binutils 13, bzip2 14, coreutils 15, cpio 16, findutils 17, gnugrep 18, gnused 19, gnutar 20, gzip 21, lz4 22, lzop 23, squashfsTools 24, util-linux 25, xz 26, zstd 27}: 28 29stdenv.mkDerivation rec { 30 pname = "dracut"; 31 version = "059"; 32 33 src = fetchFromGitHub { 34 owner = "dracutdevs"; 35 repo = "dracut"; 36 rev = version; 37 hash = "sha256-zSyC2SnSQkmS/mDpBXG2DtVVanRRI9COKQJqYZZCPJM="; 38 }; 39 40 strictDeps = true; 41 42 buildInputs = [ 43 bash 44 kmod 45 ]; 46 47 nativeBuildInputs = [ 48 makeBinaryWrapper 49 pkg-config 50 asciidoc 51 libxslt 52 docbook_xsl 53 ]; 54 55 postPatch = '' 56 substituteInPlace dracut.sh \ 57 --replace 'dracutbasedir="$dracutsysrootdir"/usr/lib/dracut' 'dracutbasedir="$dracutsysrootdir"'"$out/lib/dracut" 58 substituteInPlace lsinitrd.sh \ 59 --replace 'dracutbasedir=/usr/lib/dracut' "dracutbasedir=$out/lib/dracut" 60 61 echo 'DRACUT_VERSION=${version}' >dracut-version.sh 62 ''; 63 64 postFixup = '' 65 wrapProgram $out/bin/dracut --prefix PATH : ${lib.makeBinPath [ 66 coreutils 67 util-linux 68 ]} --suffix DRACUT_PATH : ${lib.makeBinPath [ 69 bash 70 binutils 71 coreutils 72 findutils 73 gnugrep 74 gnused 75 gnutar 76 stdenv.cc.libc # for ldd command 77 util-linux 78 ]} 79 wrapProgram $out/bin/dracut-catimages --set PATH ${lib.makeBinPath [ 80 coreutils 81 cpio 82 findutils 83 gzip 84 ]} 85 wrapProgram $out/bin/lsinitrd --set PATH ${lib.makeBinPath [ 86 binutils 87 bzip2 88 coreutils 89 cpio 90 gnused 91 gzip 92 lz4 93 lzop 94 squashfsTools 95 util-linux 96 xz 97 zstd 98 ]} 99 ''; 100 101 passthru.updateScript = gitUpdater { }; 102 103 meta = with lib; { 104 homepage = "https://github.com/dracutdevs/dracut/wiki"; 105 description = "Event driven initramfs infrastructure"; 106 license = licenses.gpl2Plus; 107 maintainers = [ ]; 108 platforms = platforms.linux; 109 }; 110}