about summary refs log tree commit diff
path: root/pkgs/tools/cd-dvd
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2017-08-10 10:57:42 +0800
committerPeter Hoeg <peter@hoeg.com>2017-08-10 10:58:04 +0800
commitb224644795bc2601da244b0e708ca7754bac64d4 (patch)
tree89b0db2703918e34dcfc9974c07fca577b3e63c1 /pkgs/tools/cd-dvd
parent767b2ae327ba3dcd0e245c074836893439e53148 (diff)
downloadnixlib-b224644795bc2601da244b0e708ca7754bac64d4.tar
nixlib-b224644795bc2601da244b0e708ca7754bac64d4.tar.gz
nixlib-b224644795bc2601da244b0e708ca7754bac64d4.tar.bz2
nixlib-b224644795bc2601da244b0e708ca7754bac64d4.tar.lz
nixlib-b224644795bc2601da244b0e708ca7754bac64d4.tar.xz
nixlib-b224644795bc2601da244b0e708ca7754bac64d4.tar.zst
nixlib-b224644795bc2601da244b0e708ca7754bac64d4.zip
unetbootin: 613 -> 655
Diffstat (limited to 'pkgs/tools/cd-dvd')
-rw-r--r--pkgs/tools/cd-dvd/unetbootin/default.nix44
1 files changed, 25 insertions, 19 deletions
diff --git a/pkgs/tools/cd-dvd/unetbootin/default.nix b/pkgs/tools/cd-dvd/unetbootin/default.nix
index 14076a757f49..4d6ddd546dbc 100644
--- a/pkgs/tools/cd-dvd/unetbootin/default.nix
+++ b/pkgs/tools/cd-dvd/unetbootin/default.nix
@@ -1,31 +1,37 @@
-{ stdenv, fetchurl, makeWrapper, qt4, utillinux, coreutils, which, qmake4Hook
+{ stdenv, fetchFromGitHub, makeWrapper, qt4, utillinux, coreutils, which, qmake4Hook
 , p7zip, mtools, syslinux }:
 
 stdenv.mkDerivation rec {
   name = "unetbootin-${version}";
-  version = "613";
+  version = "655";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/unetbootin/UNetbootin/${version}/unetbootin-source-${version}.tar.gz";
-    sha256 = "1f389z5lqimp4hlxm6zlrh1ja474r6ivzb9r43i9bvf0z1n21f0q";
+  src = fetchFromGitHub {
+    owner  = "unetbootin";
+    repo   = "unetbootin";
+    rev    = version;
+    sha256 = "1gis75vy172k7lgh8bwgap74s259y9x1wg3rkqhhqncl2vv0w1py";
   };
 
-  sourceRoot = ".";
+  sourceRoot = "${name}-src/src/unetbootin";
 
-  buildInputs = [ makeWrapper qt4 qmake4Hook ];
+  buildInputs = [ qt4 ];
+  nativeBuildInputs = [ makeWrapper qmake4Hook ];
+  enableParallelBuilding = true;
 
   # Lots of nice hard-coded paths...
-  postUnpack = ''
+  postPatch = ''
     substituteInPlace unetbootin.cpp \
-      --replace /sbin/fdisk ${utillinux}/sbin/fdisk \
-      --replace /sbin/sfdisk ${utillinux}/sbin/sfdisk \
-      --replace /sbin/blkid ${utillinux}/sbin/blkid \
-      --replace /bin/df ${coreutils}/bin/df \
-      --replace /usr/bin/syslinux ${syslinux}/bin/syslinux \
-      --replace /usr/bin/extlinux ${syslinux}/sbin/extlinux \
+      --replace /bin/df             ${coreutils}/bin/df \
+      --replace /sbin/blkid         ${utillinux}/sbin/blkid \
+      --replace /sbin/fdisk         ${utillinux}/sbin/fdisk \
+      --replace /sbin/sfdisk        ${utillinux}/sbin/sfdisk \
+      --replace /usr/bin/syslinux   ${syslinux}/bin/syslinux \
+      --replace /usr/bin/extlinux   ${syslinux}/sbin/extlinux \
       --replace /usr/share/syslinux ${syslinux}/share/syslinux
+
     substituteInPlace main.cpp \
       --replace /usr/share/unetbootin $out/share/unetbootin
+
     substituteInPlace unetbootin.desktop \
       --replace /usr/bin $out/bin
   '';
@@ -46,15 +52,15 @@ stdenv.mkDerivation rec {
     cp unetbootin.desktop $out/share/applications
 
     wrapProgram $out/bin/unetbootin \
-      --prefix PATH : ${stdenv.lib.makeBinPath [ which p7zip mtools ]} \
+      --prefix PATH : ${stdenv.lib.makeBinPath [ mtools p7zip which ]} \
       --set QT_X11_NO_MITSHM 1
   '';
 
   meta = with stdenv.lib; {
-    homepage = http://unetbootin.sourceforge.net/;
+    homepage    = http://unetbootin.sourceforge.net/;
     description = "A tool to create bootable live USB drives from ISO images";
-    license = licenses.gpl2Plus;
-    platforms = platforms.linux;
-    maintainers = [ maintainers.ebzzry ];
+    license     = licenses.gpl2Plus;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ ebzzry ];
   };
 }