Skip to content

Commit 276adb9

Browse files
committedJun 24, 2017
heimdall: 1.4.1 -> 1.4.2
1 parent 06271b6 commit 276adb9

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed
 

‎pkgs/tools/misc/heimdall/default.nix

+20-23
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,46 @@
1-
{ stdenv, fetchFromGitHub, zlib, libusb1, cmake, qt5, enableGUI ? false }:
1+
{ stdenv, fetchFromGitHub, cmake
2+
, zlib, libusb1
3+
, enableGUI ? false, qtbase ? null }:
24

3-
let version = "1.4.1-37-gb6fe7f8"; in
4-
5-
stdenv.mkDerivation {
6-
name = "heimdall-${version}";
5+
stdenv.mkDerivation rec {
6+
name = "heimdall-${if enableGUI then "gui-" else ""}${version}";
7+
version = "1.4.2";
78

89
src = fetchFromGitHub {
910
owner = "Benjamin-Dobell";
1011
repo = "Heimdall";
1112
rev = "v${version}";
12-
sha256 = "10c71k251wxd05j6c76qlar5sd73zam1c1g2cq3cscqayd7rzafg";
13+
sha256 = "1ygn4snvcmi98rgldgxf5hwm7zzi1zcsihfvm6awf9s6mpcjzbqz";
1314
};
1415

15-
buildInputs = [ zlib libusb1 cmake ];
16+
buildInputs = [
17+
zlib libusb1
18+
] ++ stdenv.lib.optional enableGUI qtbase;
19+
nativeBuildInputs = [ cmake ];
1620

1721
cmakeFlags = [
18-
"-DBUILD_TYPE=Release"
1922
"-DDISABLE_FRONTEND=${if enableGUI then "OFF" else "ON"}"
20-
] ++ stdenv.lib.optionals enableGUI [
21-
"-DQt5Widgets_DIR=${qt5.qtbase.dev}/lib/cmake/Qt5Widgets"
22-
"-DQt5Gui_DIR=${qt5.qtbase.dev}/lib/cmake/Qt5Gui"
23-
"-DQt5Core_DIR=${qt5.qtbase.dev}/lib/cmake/Qt5Core"
2423
];
2524

2625
preConfigure = ''
2726
# Give ownership of the Galaxy S USB device to the logged in user.
2827
substituteInPlace heimdall/60-heimdall.rules --replace 'MODE="0666"' 'TAG+="uaccess"'
29-
30-
# Fix version string reported by the executable.
31-
sed -i -e 's/version = "v.*"/version = "v${version}"/' heimdall/source/Interface.cpp
3228
'';
3329

3430
installPhase = ''
35-
mkdir -p $out/bin $out/share/doc/heimdall $out/lib/udev/rules.d
36-
cp "bin/"* $out/bin/
37-
cp ../Linux/README $out/share/doc/heimdall
38-
cp ../heimdall/60-heimdall.rules $out/lib/udev/rules.d
31+
mkdir -p $out/{bin,share/doc/heimdall,lib/udev/rules.d}
32+
install -m755 -t $out/bin bin/*
33+
install -m644 -t $out/share/doc/heimdall ../Linux/README
34+
install -m644 -t $out/lib/udev/rules.d ../heimdall/60-heimdall.rules
3935
'';
4036

4137
enableParallelBuilding = true;
4238

43-
meta = {
44-
homepage = "http://www.glassechidna.com.au/products/heimdall/";
39+
meta = with stdenv.lib; {
40+
homepage = http://www.glassechidna.com.au/products/heimdall/;
4541
description = "A cross-platform tool suite to flash firmware onto Samsung Galaxy S devices";
46-
license = stdenv.lib.licenses.mit;
47-
platforms = stdenv.lib.platforms.linux;
42+
license = licenses.mit;
43+
maintainers = with maintainers; [ peterhoeg ];
44+
platforms = platforms.unix;
4845
};
4946
}

‎pkgs/top-level/all-packages.nix

+3-1
Original file line numberDiff line numberDiff line change
@@ -2367,7 +2367,9 @@ with pkgs;
23672367

23682368
heaptrack = libsForQt5.callPackage ../development/tools/profiling/heaptrack {};
23692369

2370-
heimdall = callPackage ../tools/misc/heimdall { };
2370+
heimdall = libsForQt5.callPackage ../tools/misc/heimdall { enableGUI = false; };
2371+
2372+
heimdall-gui = libsForQt5.callPackage ../tools/misc/heimdall { enableGUI = true; };
23712373

23722374
hevea = callPackage ../tools/typesetting/hevea { };
23732375

0 commit comments

Comments
 (0)