about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/woeusb/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/woeusb/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/woeusb/default.nix45
1 files changed, 19 insertions, 26 deletions
diff --git a/nixpkgs/pkgs/tools/misc/woeusb/default.nix b/nixpkgs/pkgs/tools/misc/woeusb/default.nix
index 8cbd1ad06977..ade752e09f66 100644
--- a/nixpkgs/pkgs/tools/misc/woeusb/default.nix
+++ b/nixpkgs/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,9 +45,9 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Create bootable USB disks from Windows ISO images";
-    homepage = "https://github.com/slacka/WoeUSB";
-    license = licenses.gpl3;
-    maintainers = with maintainers; [ bjornfor gnidorah ];
+    homepage = "https://github.com/WoeUSB/WoeUSB";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ bjornfor ];
     platforms = platforms.linux;
   };
 }