1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 23:10:02 +00:00
nixpkgs/pkgs/tools/misc/heimdall/default.nix

48 lines
1.5 KiB
Nix
Raw Normal View History

2017-06-24 05:49:07 +01:00
{ stdenv, fetchFromGitHub, cmake
, zlib, libusb1
, enableGUI ? false, qtbase ? null }:
2016-01-16 00:36:34 +00:00
2017-06-24 05:49:07 +01:00
stdenv.mkDerivation rec {
name = "heimdall-${if enableGUI then "gui-" else ""}${version}";
version = "1.4.2";
2015-01-20 05:37:44 +00:00
src = fetchFromGitHub {
owner = "Benjamin-Dobell";
repo = "Heimdall";
rev = "v${version}";
2017-06-24 05:49:07 +01:00
sha256 = "1ygn4snvcmi98rgldgxf5hwm7zzi1zcsihfvm6awf9s6mpcjzbqz";
};
2017-06-24 05:49:07 +01:00
buildInputs = [
zlib libusb1
] ++ stdenv.lib.optional enableGUI qtbase;
nativeBuildInputs = [ cmake ];
2016-05-07 09:46:52 +01:00
cmakeFlags = [
"-DDISABLE_FRONTEND=${if enableGUI then "OFF" else "ON"}"
2016-05-07 09:46:52 +01:00
];
2013-08-31 15:36:47 +01:00
2016-05-07 09:46:52 +01:00
preConfigure = ''
# Give ownership of the Galaxy S USB device to the logged in user.
substituteInPlace heimdall/60-heimdall.rules --replace 'MODE="0666"' 'TAG+="uaccess"'
'';
2016-05-07 09:46:52 +01:00
installPhase = ''
2017-06-24 05:49:07 +01:00
mkdir -p $out/{bin,share/doc/heimdall,lib/udev/rules.d}
install -m755 -t $out/bin bin/*
install -m644 -t $out/lib/udev/rules.d ../heimdall/60-heimdall.rules
2017-06-24 06:18:01 +01:00
install -m644 ../Linux/README $out/share/doc/heimdall/README.linux
install -m644 ../OSX/README.txt $out/share/doc/heimdall/README.osx
2016-05-07 09:46:52 +01:00
'';
enableParallelBuilding = true;
2017-06-24 05:49:07 +01:00
meta = with stdenv.lib; {
homepage = http://www.glassechidna.com.au/products/heimdall/;
2016-05-07 09:46:52 +01:00
description = "A cross-platform tool suite to flash firmware onto Samsung Galaxy S devices";
2017-06-24 05:49:07 +01:00
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
};
}