heimdall: 1.4.1 -> 1.4.2

This commit is contained in:
Peter Hoeg 2017-06-24 12:49:07 +08:00
parent 06271b6eba
commit 276adb96fa
2 changed files with 23 additions and 24 deletions

View File

@ -1,49 +1,46 @@
{ stdenv, fetchFromGitHub, zlib, libusb1, cmake, qt5, enableGUI ? false }:
{ stdenv, fetchFromGitHub, cmake
, zlib, libusb1
, enableGUI ? false, qtbase ? null }:
let version = "1.4.1-37-gb6fe7f8"; in
stdenv.mkDerivation {
name = "heimdall-${version}";
stdenv.mkDerivation rec {
name = "heimdall-${if enableGUI then "gui-" else ""}${version}";
version = "1.4.2";
src = fetchFromGitHub {
owner = "Benjamin-Dobell";
repo = "Heimdall";
rev = "v${version}";
sha256 = "10c71k251wxd05j6c76qlar5sd73zam1c1g2cq3cscqayd7rzafg";
sha256 = "1ygn4snvcmi98rgldgxf5hwm7zzi1zcsihfvm6awf9s6mpcjzbqz";
};
buildInputs = [ zlib libusb1 cmake ];
buildInputs = [
zlib libusb1
] ++ stdenv.lib.optional enableGUI qtbase;
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DBUILD_TYPE=Release"
"-DDISABLE_FRONTEND=${if enableGUI then "OFF" else "ON"}"
] ++ stdenv.lib.optionals enableGUI [
"-DQt5Widgets_DIR=${qt5.qtbase.dev}/lib/cmake/Qt5Widgets"
"-DQt5Gui_DIR=${qt5.qtbase.dev}/lib/cmake/Qt5Gui"
"-DQt5Core_DIR=${qt5.qtbase.dev}/lib/cmake/Qt5Core"
];
preConfigure = ''
# Give ownership of the Galaxy S USB device to the logged in user.
substituteInPlace heimdall/60-heimdall.rules --replace 'MODE="0666"' 'TAG+="uaccess"'
# Fix version string reported by the executable.
sed -i -e 's/version = "v.*"/version = "v${version}"/' heimdall/source/Interface.cpp
'';
installPhase = ''
mkdir -p $out/bin $out/share/doc/heimdall $out/lib/udev/rules.d
cp "bin/"* $out/bin/
cp ../Linux/README $out/share/doc/heimdall
cp ../heimdall/60-heimdall.rules $out/lib/udev/rules.d
mkdir -p $out/{bin,share/doc/heimdall,lib/udev/rules.d}
install -m755 -t $out/bin bin/*
install -m644 -t $out/share/doc/heimdall ../Linux/README
install -m644 -t $out/lib/udev/rules.d ../heimdall/60-heimdall.rules
'';
enableParallelBuilding = true;
meta = {
homepage = "http://www.glassechidna.com.au/products/heimdall/";
meta = with stdenv.lib; {
homepage = http://www.glassechidna.com.au/products/heimdall/;
description = "A cross-platform tool suite to flash firmware onto Samsung Galaxy S devices";
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
};
}

View File

@ -2367,7 +2367,9 @@ with pkgs;
heaptrack = libsForQt5.callPackage ../development/tools/profiling/heaptrack {};
heimdall = callPackage ../tools/misc/heimdall { };
heimdall = libsForQt5.callPackage ../tools/misc/heimdall { enableGUI = false; };
heimdall-gui = libsForQt5.callPackage ../tools/misc/heimdall { enableGUI = true; };
hevea = callPackage ../tools/typesetting/hevea { };