diff --git a/pkgs/tools/misc/woeusb/default.nix b/pkgs/tools/misc/woeusb/default.nix index a728afc388a..ade752e09f6 100644 --- a/pkgs/tools/misc/woeusb/default.nix +++ b/pkgs/tools/misc/woeusb/default.nix @@ -1,45 +1,38 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, makeWrapper -, coreutils, dosfstools, findutils, gawk, gnugrep, grub2_light, ncurses, ntfs3g, parted, p7zip, util-linux, wget -, wxGTK30 }: +{ lib, stdenv, fetchFromGitHub, installShellFiles, makeWrapper +, coreutils, dosfstools, findutils, gawk, gnugrep, grub2_light, ncurses, ntfs3g, parted, p7zip, util-linux, wimlib, wget }: stdenv.mkDerivation rec { - version = "3.3.1"; + version = "5.1.0"; pname = "woeusb"; src = fetchFromGitHub { - owner = "slacka"; + owner = "WoeUSB"; repo = "WoeUSB"; rev = "v${version}"; - sha256 = "1hbr88sr943s4yqdvbny543jvgvnsa622wq4cmwd23hjsfcrvyiv"; + sha256 = "1qakk7lnj71m061rn72nabk4c37vw0vkx2a28xgxas8v8cwvkkam"; }; - patches = [ ./remove-workaround.patch ]; - - nativeBuildInputs = [ autoreconfHook makeWrapper ]; - buildInputs = [ wxGTK30 ]; + nativeBuildInputs = [ installShellFiles makeWrapper ]; postPatch = '' # Emulate version smudge filter (see .gitattributes, .gitconfig). - for file in configure.ac debian/changelog src/woeusb src/woeusb.1 src/woeusbgui.1; do + for file in sbin/woeusb share/man/man1/woeusb.1; do substituteInPlace "$file" \ --replace '@@WOEUSB_VERSION@@' '${version}' done - - substituteInPlace src/MainPanel.cpp \ - --replace "'woeusb " "'$out/bin/woeusb " ''; - postInstall = '' - # don't write data into / - substituteInPlace "$out/bin/woeusb" \ - --replace /media/ /run/woeusb/ + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + mv sbin/woeusb $out/bin + installManPage share/man/man1/woeusb.1 - # woeusbgui launches woeusb with pkexec, which sets - # PATH=/usr/sbin:/usr/bin:/sbin:/bin:/root/bin. Perhaps pkexec - # should be patched with a less useless default PATH, but for now - # we add everything we need manually. wrapProgram "$out/bin/woeusb" \ - --set PATH '${lib.makeBinPath [ coreutils dosfstools findutils gawk gnugrep grub2_light ncurses ntfs3g parted util-linux wget p7zip ]}' + --set PATH '${lib.makeBinPath [ coreutils dosfstools findutils gawk gnugrep grub2_light ncurses ntfs3g parted p7zip util-linux wget wimlib ]}' + + runHook postInstall ''; doInstallCheck = true; @@ -52,8 +45,8 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Create bootable USB disks from Windows ISO images"; - homepage = "https://github.com/slacka/WoeUSB"; - license = licenses.gpl3; + homepage = "https://github.com/WoeUSB/WoeUSB"; + license = licenses.gpl3Plus; maintainers = with maintainers; [ bjornfor ]; platforms = platforms.linux; }; diff --git a/pkgs/tools/misc/woeusb/remove-workaround.patch b/pkgs/tools/misc/woeusb/remove-workaround.patch deleted file mode 100644 index 3550002dfed..00000000000 --- a/pkgs/tools/misc/woeusb/remove-workaround.patch +++ /dev/null @@ -1,15 +0,0 @@ -https://github.com/slacka/WoeUSB/issues/267 - -diff --git a/src/woeusb b/src/woeusb -index 8cb292c..c017dbf 100755 ---- a/src/woeusb -+++ b/src/woeusb -@@ -1661,6 +1661,8 @@ workaround_support_windows_7_uefi_boot(){ - ## - System lagging while copying data · Issue #113 · slacka/WoeUSB - ## - The pernicious USB-stick stall problem [LWN.net] - workaround_linux_make_writeback_buffering_not_suck(){ -+ return 0 -+ - util_check_function_parameters_quantity 1 "${#}" - local -r mode="${1}" -