nixpkgs-suyu/pkgs/tools/cd-dvd/unetbootin/default.nix
R. RyanTM f63c52bc42 unetbootin: 657 -> 661
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/unetbootin/versions.

These checks were done:

- built on NixOS
- Warning: no invocation of /nix/store/25pjsiav4kpzyvms0a24zfmm3267nsq9-unetbootin-661/bin/unetbootin had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/25pjsiav4kpzyvms0a24zfmm3267nsq9-unetbootin-661/bin/.unetbootin-wrapped had a zero exit code or showed the expected version
- 0 of 2 passed binary check by having a zero exit code.
- 0 of 2 passed binary check by having the new version present in output.
- found 661 with grep in /nix/store/25pjsiav4kpzyvms0a24zfmm3267nsq9-unetbootin-661
- directory tree listing: https://gist.github.com/b36c6d9dbe30c7b0e794715dafed8272
- du listing: https://gist.github.com/2da554212740e7e9655de8e211d2e8ed
2018-06-05 15:57:40 -07:00

67 lines
2 KiB
Nix

{ 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 ];
};
}