2016-04-17 00:52:24 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, qt4, utillinux, coreutils, which, qmake4Hook
|
2015-09-14 22:11:34 +01:00
|
|
|
, p7zip, mtools, syslinux }:
|
2010-08-06 23:33:14 +01:00
|
|
|
|
2015-09-14 22:11:34 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2010-08-06 23:33:14 +01:00
|
|
|
name = "unetbootin-${version}";
|
2015-09-14 22:11:34 +01:00
|
|
|
version = "613";
|
2010-08-06 23:33:14 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/unetbootin/UNetbootin/${version}/unetbootin-source-${version}.tar.gz";
|
2015-09-14 22:11:34 +01:00
|
|
|
sha256 = "1f389z5lqimp4hlxm6zlrh1ja474r6ivzb9r43i9bvf0z1n21f0q";
|
2010-08-06 23:33:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
2016-04-17 00:52:24 +01:00
|
|
|
buildInputs = [ makeWrapper qt4 qmake4Hook ];
|
2010-08-06 23:33:14 +01:00
|
|
|
|
|
|
|
# Lots of nice hard-coded paths...
|
2015-09-14 22:11:34 +01:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2016-04-17 00:52:24 +01:00
|
|
|
preConfigure = ''
|
2015-09-14 22:11:34 +01:00
|
|
|
lupdate unetbootin.pro
|
|
|
|
lrelease unetbootin.pro
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp unetbootin $out/bin
|
|
|
|
|
|
|
|
mkdir -p $out/share/unetbootin
|
|
|
|
cp unetbootin_*.qm $out/share/unetbootin
|
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp unetbootin.desktop $out/share/applications
|
|
|
|
|
|
|
|
wrapProgram $out/bin/unetbootin \
|
2016-08-22 23:06:51 +01:00
|
|
|
--prefix PATH : ${stdenv.lib.makeBinPath [ which p7zip mtools ]}
|
2015-09-14 22:11:34 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2010-08-06 23:33:14 +01:00
|
|
|
homepage = http://unetbootin.sourceforge.net/;
|
|
|
|
description = "A tool to create bootable live USB drives from ISO images";
|
2015-09-14 22:11:34 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.ebzzry ];
|
2010-08-06 23:33:14 +01:00
|
|
|
};
|
|
|
|
}
|