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