1 { lib, stdenv, fetchFromGitHub, installShellFiles, makeWrapper
2 , coreutils, dosfstools, findutils, gawk, gnugrep, grub2_light, ncurses, ntfs3g, parted, p7zip, util-linux, wimlib, wget }:
4 stdenv.mkDerivation rec {
8 src = fetchFromGitHub {
12 sha256 = "sha256-HB1E7rP/U58dyL3j6YnhF5AOGAcHqmA/ZZ5JNBDibco=";
15 nativeBuildInputs = [ installShellFiles makeWrapper ];
18 # Emulate version smudge filter (see .gitattributes, .gitconfig).
19 for file in sbin/woeusb share/man/man1/woeusb.1; do
20 substituteInPlace "$file" \
21 --replace '@@WOEUSB_VERSION@@' '${version}'
29 mv sbin/woeusb $out/bin
30 installManPage share/man/man1/woeusb.1
32 wrapProgram "$out/bin/woeusb" \
33 --set PATH '${lib.makeBinPath [ coreutils dosfstools findutils gawk gnugrep grub2_light ncurses ntfs3g parted p7zip util-linux wget wimlib ]}'
38 doInstallCheck = true;
41 # woeusb --version checks for missing runtime dependencies.
42 out_version="$("$out/bin/woeusb" --version)"
43 [ "$out_version" = '${version}' ]
47 description = "Create bootable USB disks from Windows ISO images";
48 homepage = "https://github.com/WoeUSB/WoeUSB";
49 license = licenses.gpl3Plus;
50 maintainers = with maintainers; [ bjornfor ];
51 platforms = platforms.linux;
52 mainProgram = "woeusb";