summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/cd-dvd/unetbootin
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-08-06 22:33:14 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-08-06 22:33:14 +0000
commitd7842faf49528b563274aadcff5e870a82f9815b (patch)
tree28a77c07cb7e7fb832a5fbfb09b3550745f5f85d /pkgs/tools/cd-dvd/unetbootin
parent492d64e168224ac7b4019e506a8801ee13ee68ef (diff)
* Added UNetbootin, a program for creating bootable USB sticks from
ISO images. svn path=/nixpkgs/trunk/; revision=23018
Diffstat (limited to 'pkgs/tools/cd-dvd/unetbootin')
-rw-r--r--pkgs/tools/cd-dvd/unetbootin/default.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/tools/cd-dvd/unetbootin/default.nix b/pkgs/tools/cd-dvd/unetbootin/default.nix
new file mode 100644
index 000000000000..9b4e7fd914c6
--- /dev/null
+++ b/pkgs/tools/cd-dvd/unetbootin/default.nix
@@ -0,0 +1,62 @@
+{ stdenv, fetchurl, makeWrapper, qt4, utillinux, coreutils, which, p7zip, mtools, syslinux }:
+
+let version = "485"; in
+
+stdenv.mkDerivation rec {
+ name = "unetbootin-${version}";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/unetbootin/UNetbootin/${version}/unetbootin-source-${version}.tar.gz";
+ sha256 = "1nyzy1wrql0l6zkmrd1l3qqvbdkv0534axdz6vy3cyksp157jxc8";
+ };
+
+ sourceRoot = ".";
+
+ buildInputs = [ makeWrapper qt4 ];
+
+ # Lots of nice hard-coded paths...
+ postUnpack =
+ ''
+ 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 /usr/share/syslinux ${syslinux}/share/syslinux
+ substituteInPlace main.cpp \
+ --replace /usr/share/unetbootin $out/share/unetbootin
+ substituteInPlace unetbootin.desktop \
+ --replace /usr/bin $out/bin
+ '';
+
+ buildPhase =
+ ''
+ lupdate unetbootin.pro
+ lrelease unetbootin.pro
+ qmake
+ make
+ '';
+
+ installPhase =
+ ''
+ ensureDir $out/bin
+ cp unetbootin $out/bin
+
+ ensureDir $out/share/unetbootin
+ cp unetbootin_*.qm $out/share/unetbootin
+
+ ensureDir $out/share/applications
+ cp unetbootin.desktop $out/share/applications
+
+ wrapProgram $out/bin/unetbootin \
+ --prefix PATH : ${which}/bin:${p7zip}/bin:${mtools}/bin
+ '';
+
+ meta = {
+ homepage = http://unetbootin.sourceforge.net/;
+ description = "A tool to create bootable live USB drives from ISO images";
+ license = "GPLv2+";
+ };
+}