woeusb: 3.3.1 -> 5.1.0

This commit is contained in:
Justinas Stankevicius 2021-05-17 22:13:58 +03:00
parent b09fc82382
commit b817777ed7
2 changed files with 18 additions and 40 deletions

View file

@ -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;
};

View file

@ -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 <https://github.com/slacka/WoeUSB/issues/113>
## - The pernicious USB-stick stall problem [LWN.net] <https://lwn.net/Articles/572911/>
workaround_linux_make_writeback_buffering_not_suck(){
+ return 0
+
util_check_function_parameters_quantity 1 "${#}"
local -r mode="${1}"