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 rec {
name = "heimdall-${if enableGUI then "gui-" else ""}${version}";
stdenv.mkDerivation { version = "1.4.2";
name = "heimdall-${version}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Benjamin-Dobell"; owner = "Benjamin-Dobell";
repo = "Heimdall"; repo = "Heimdall";
rev = "v${version}"; rev = "v${version}";
sha256 = "10c71k251wxd05j6c76qlar5sd73zam1c1g2cq3cscqayd7rzafg"; sha256 = "1ygn4snvcmi98rgldgxf5hwm7zzi1zcsihfvm6awf9s6mpcjzbqz";
}; };
buildInputs = [ zlib libusb1 cmake ]; buildInputs = [
zlib libusb1
] ++ stdenv.lib.optional enableGUI qtbase;
nativeBuildInputs = [ cmake ];
cmakeFlags = [ cmakeFlags = [
"-DBUILD_TYPE=Release"
"-DDISABLE_FRONTEND=${if enableGUI then "OFF" else "ON"}" "-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 = '' preConfigure = ''
# Give ownership of the Galaxy S USB device to the logged in user. # Give ownership of the Galaxy S USB device to the logged in user.
substituteInPlace heimdall/60-heimdall.rules --replace 'MODE="0666"' 'TAG+="uaccess"' 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 = '' installPhase = ''
mkdir -p $out/bin $out/share/doc/heimdall $out/lib/udev/rules.d mkdir -p $out/{bin,share/doc/heimdall,lib/udev/rules.d}
cp "bin/"* $out/bin/ install -m755 -t $out/bin bin/*
cp ../Linux/README $out/share/doc/heimdall install -m644 -t $out/share/doc/heimdall ../Linux/README
cp ../heimdall/60-heimdall.rules $out/lib/udev/rules.d install -m644 -t $out/lib/udev/rules.d ../heimdall/60-heimdall.rules
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;
meta = { meta = with stdenv.lib; {
homepage = "http://www.glassechidna.com.au/products/heimdall/"; homepage = http://www.glassechidna.com.au/products/heimdall/;
description = "A cross-platform tool suite to flash firmware onto Samsung Galaxy S devices"; description = "A cross-platform tool suite to flash firmware onto Samsung Galaxy S devices";
license = stdenv.lib.licenses.mit; license = licenses.mit;
platforms = stdenv.lib.platforms.linux; maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
}; };
} }

View File

@ -2367,7 +2367,9 @@ with pkgs;
heaptrack = libsForQt5.callPackage ../development/tools/profiling/heaptrack {}; 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 { }; hevea = callPackage ../tools/typesetting/hevea { };