uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
84
pkgs/tools/cd-dvd/unetbootin/default.nix
Normal file
84
pkgs/tools/cd-dvd/unetbootin/default.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, coreutils
|
||||
, fetchFromGitHub
|
||||
, mtools
|
||||
, p7zip
|
||||
, wrapQtAppsHook
|
||||
, qtbase
|
||||
, qttools
|
||||
, qmake
|
||||
, syslinux
|
||||
, util-linux
|
||||
, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "unetbootin";
|
||||
version = "702";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-psX15XicPXAsd36BhuvK0G3GQS8hV/hazzO0HByCqV4=";
|
||||
};
|
||||
|
||||
setSourceRoot = ''
|
||||
sourceRoot=$(echo */src/unetbootin)
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
qtbase
|
||||
qttools
|
||||
qmake
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ wrapQtAppsHook ];
|
||||
|
||||
# Lots of nice hard-coded paths...
|
||||
postPatch = ''
|
||||
substituteInPlace unetbootin.cpp \
|
||||
--replace /bin/df ${coreutils}/bin/df \
|
||||
--replace /sbin/blkid ${util-linux}/sbin/blkid \
|
||||
--replace /sbin/fdisk ${util-linux}/sbin/fdisk \
|
||||
--replace /sbin/sfdisk ${util-linux}/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
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
qtWrapperArgs = [
|
||||
"--prefix PATH : ${lib.makeBinPath [ mtools p7zip which ]}"
|
||||
"--set QT_X11_NO_MITSHM 1"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool to create bootable live USB drives from ISO images";
|
||||
homepage = "https://unetbootin.github.io/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ ebzzry ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue