Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 60 lines 1.5 kB view raw
1{ lib 2, stdenvNoCC 3, fetchFromGitHub 4, fetchpatch 5, bash 6, makeWrapper 7, bc 8, jq 9, coreutils 10, util-linux 11, wimlib 12, file 13, syslinux 14, busybox 15, gnugrep # We can't use busybox's 'grep' as it doesn't support perl '-P' expressions. 16}: 17 18stdenvNoCC.mkDerivation rec { 19 pname = "bootiso"; 20 version = "4.2.0"; 21 22 src = fetchFromGitHub { 23 owner = "jsamr"; 24 repo = pname; 25 rev = "v${version}"; 26 sha256 = "1l09d543b73r0wbpsj5m6kski8nq48lbraq1myxhidkgl3mm3d5i"; 27 }; 28 29 patches = [ 30 (fetchpatch { 31 url = "https://code.opensuse.org/package/bootiso/raw/3799710e3da40c1b429ea1a2ce3896d18d08a5c5/f/syslinux-lib-root.patch"; 32 sha256 = "sha256-x2EJppQsPPymSrjRwEy7mylW+2OKcGzKsKF3y7fzrB8="; 33 }) 34 ]; 35 36 strictDeps = true; 37 buildInputs = [ bash ]; 38 nativeBuildInputs = [ makeWrapper ]; 39 40 makeFlags = [ "prefix=${placeholder "out"}" ]; 41 42 postPatch = '' 43 substituteInPlace bootiso \ 44 --replace "\$(basename \"\$0\")" "bootiso" \ 45 --replace "/usr/share/syslinux" "${syslinux}/share/syslinux" 46 ''; 47 48 postInstall = '' 49 wrapProgram $out/bin/bootiso \ 50 --prefix PATH : ${lib.makeBinPath [ bc jq coreutils util-linux wimlib file syslinux gnugrep busybox ]} \ 51 ''; 52 53 meta = with lib; { 54 description = "Script for securely creating a bootable USB device from one image file"; 55 homepage = "https://github.com/jsamr/bootiso"; 56 license = licenses.gpl3; 57 maintainers = with maintainers; [ muscaln ]; 58 platforms = platforms.all; 59 }; 60}