2010-08-06 22:33:14 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, qt4, utillinux, coreutils, which, p7zip, mtools, syslinux }:
|
|
|
|
|
2011-10-31 00:25:55 +00:00
|
|
|
let version = "563"; in
|
2010-08-06 22:33:14 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "unetbootin-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/unetbootin/UNetbootin/${version}/unetbootin-source-${version}.tar.gz";
|
2011-10-31 00:25:55 +00:00
|
|
|
sha256 = "1j4ka6rjf5akhcdb4pbfdrka9zflhch97b5i42zk1cf8hd6wx939";
|
2010-08-06 22:33:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 =
|
|
|
|
''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2010-08-06 22:33:14 +00:00
|
|
|
cp unetbootin $out/bin
|
2011-10-31 00:25:55 +00:00
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/unetbootin
|
2010-08-06 22:33:14 +00:00
|
|
|
cp unetbootin_*.qm $out/share/unetbootin
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/applications
|
2010-08-06 22:33:14 +00:00
|
|
|
cp unetbootin.desktop $out/share/applications
|
2011-10-31 00:25:55 +00:00
|
|
|
|
2010-08-06 22:33:14 +00:00
|
|
|
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+";
|
2010-08-11 13:55:56 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2010-08-06 22:33:14 +00:00
|
|
|
};
|
|
|
|
}
|