diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/tools/cd-dvd/unetbootin/default.nix | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/tools/cd-dvd/unetbootin/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/cd-dvd/unetbootin/default.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/cd-dvd/unetbootin/default.nix b/nixpkgs/pkgs/tools/cd-dvd/unetbootin/default.nix new file mode 100644 index 000000000000..502937dd565b --- /dev/null +++ b/nixpkgs/pkgs/tools/cd-dvd/unetbootin/default.nix @@ -0,0 +1,67 @@ +{ stdenv, fetchFromGitHub, makeWrapper, qt4, utillinux, coreutils, which, qmake4Hook +, p7zip, mtools, syslinux }: + +stdenv.mkDerivation rec { + name = "unetbootin-${version}"; + version = "661"; + + src = fetchFromGitHub { + owner = "unetbootin"; + repo = "unetbootin"; + rev = version; + sha256 = "0jwmmym86x9hc6yr619dxdbxdawx8x0zwld0dfrhzwxvwbqbpav5"; + }; + + setSourceRoot = '' + sourceRoot=$(echo */src/unetbootin) + ''; + + buildInputs = [ qt4 ]; + nativeBuildInputs = [ makeWrapper qmake4Hook ]; + enableParallelBuilding = true; + + # Lots of nice hard-coded paths... + postPatch = '' + substituteInPlace unetbootin.cpp \ + --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 + ''; + + preConfigure = '' + lupdate unetbootin.pro + lrelease unetbootin.pro + ''; + + installPhase = '' + runHook preInstall + + install -Dm755 -t $out/bin unetbootin + install -Dm644 -t $out/share/unetbootin unetbootin_*.qm + install -Dm644 -t $out/share/applications unetbootin.desktop + + wrapProgram $out/bin/unetbootin \ + --prefix PATH : ${stdenv.lib.makeBinPath [ mtools p7zip which ]} \ + --set QT_X11_NO_MITSHM 1 + + runHook postInstall + ''; + + meta = with stdenv.lib; { + homepage = http://unetbootin.sourceforge.net/; + description = "A tool to create bootable live USB drives from ISO images"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ ebzzry ]; + }; +} |