2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, qt4, util-linux, 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 {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "unetbootin";
|
2020-06-11 13:31:44 +01:00
|
|
|
version = "681";
|
2010-08-06 23:33:14 +01:00
|
|
|
|
2017-08-10 03:57:42 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "unetbootin";
|
|
|
|
repo = "unetbootin";
|
|
|
|
rev = version;
|
2020-06-11 13:31:44 +01:00
|
|
|
sha256 = "0ppqb7ywh4cpcjr5nw6f65dx4s8kx09gnhihnby3zjhxdf4l99fm";
|
2010-08-06 23:33:14 +01:00
|
|
|
};
|
|
|
|
|
2017-11-02 12:54:20 +00:00
|
|
|
setSourceRoot = ''
|
|
|
|
sourceRoot=$(echo */src/unetbootin)
|
|
|
|
'';
|
2010-08-06 23:33:14 +01:00
|
|
|
|
2017-08-10 03:57:42 +01:00
|
|
|
buildInputs = [ qt4 ];
|
|
|
|
nativeBuildInputs = [ makeWrapper qmake4Hook ];
|
|
|
|
enableParallelBuilding = true;
|
2010-08-06 23:33:14 +01:00
|
|
|
|
|
|
|
# Lots of nice hard-coded paths...
|
2017-08-10 03:57:42 +01:00
|
|
|
postPatch = ''
|
2015-09-14 22:11:34 +01:00
|
|
|
substituteInPlace unetbootin.cpp \
|
2017-08-10 03:57:42 +01:00
|
|
|
--replace /bin/df ${coreutils}/bin/df \
|
2020-11-24 15:29:28 +00:00
|
|
|
--replace /sbin/blkid ${util-linux}/sbin/blkid \
|
|
|
|
--replace /sbin/fdisk ${util-linux}/sbin/fdisk \
|
|
|
|
--replace /sbin/sfdisk ${util-linux}/sbin/sfdisk \
|
2017-08-10 03:57:42 +01:00
|
|
|
--replace /usr/bin/syslinux ${syslinux}/bin/syslinux \
|
|
|
|
--replace /usr/bin/extlinux ${syslinux}/sbin/extlinux \
|
2015-09-14 22:11:34 +01:00
|
|
|
--replace /usr/share/syslinux ${syslinux}/share/syslinux
|
2017-08-10 03:57:42 +01:00
|
|
|
|
2015-09-14 22:11:34 +01:00
|
|
|
substituteInPlace main.cpp \
|
|
|
|
--replace /usr/share/unetbootin $out/share/unetbootin
|
2017-08-10 03:57:42 +01:00
|
|
|
|
2015-09-14 22:11:34 +01:00
|
|
|
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 = ''
|
2017-11-02 05:24:32 +00:00
|
|
|
runHook preInstall
|
2015-09-14 22:11:34 +01:00
|
|
|
|
2017-11-02 05:24:32 +00:00
|
|
|
install -Dm755 -t $out/bin unetbootin
|
|
|
|
install -Dm644 -t $out/share/unetbootin unetbootin_*.qm
|
|
|
|
install -Dm644 -t $out/share/applications unetbootin.desktop
|
2015-09-14 22:11:34 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/unetbootin \
|
2021-01-15 09:19:50 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ mtools p7zip which ]} \
|
2017-05-20 19:41:03 +01:00
|
|
|
--set QT_X11_NO_MITSHM 1
|
2017-11-02 05:24:32 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2015-09-14 22:11:34 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://unetbootin.sourceforge.net/";
|
2010-08-06 23:33:14 +01:00
|
|
|
description = "A tool to create bootable live USB drives from ISO images";
|
2017-08-10 03:57:42 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ ebzzry ];
|
2010-08-06 23:33:14 +01:00
|
|
|
};
|
|
|
|
}
|