diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2011-08-21 00:10:12 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2011-08-21 00:10:12 +0000 |
commit | 631ba2a5f0e3c0874e8f72afdb1166ea747d023e (patch) | |
tree | 9e580e5d2d1d85d7abeafd922d3f463aef195996 /pkgs/tools/misc/heimdall | |
parent | d99e939015fb1a46a52ecf9ca088feecf2452aa3 (diff) | |
download | nixpkgs-631ba2a5f0e3c0874e8f72afdb1166ea747d023e.tar nixpkgs-631ba2a5f0e3c0874e8f72afdb1166ea747d023e.tar.gz nixpkgs-631ba2a5f0e3c0874e8f72afdb1166ea747d023e.tar.bz2 nixpkgs-631ba2a5f0e3c0874e8f72afdb1166ea747d023e.tar.lz nixpkgs-631ba2a5f0e3c0874e8f72afdb1166ea747d023e.tar.xz nixpkgs-631ba2a5f0e3c0874e8f72afdb1166ea747d023e.tar.zst nixpkgs-631ba2a5f0e3c0874e8f72afdb1166ea747d023e.zip |
svn path=/nixpkgs/trunk/; revision=28716
Diffstat (limited to 'pkgs/tools/misc/heimdall')
-rw-r--r-- | pkgs/tools/misc/heimdall/default.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/tools/misc/heimdall/default.nix b/pkgs/tools/misc/heimdall/default.nix new file mode 100644 index 00000000000..0b0120ab279 --- /dev/null +++ b/pkgs/tools/misc/heimdall/default.nix @@ -0,0 +1,57 @@ +{ stdenv, fetchgit, pkgconfig, libusb1, udev +, enableGUI ? true, qt4 ? null +}: + +stdenv.mkDerivation { + name = "heimdall-1.3.0"; + + src = fetchgit { + url = git://github.com/Benjamin-Dobell/Heimdall.git; + rev = "ed9b08e5d9e3db60d52bccf6cb6919fb4bd47602"; + sha256 = "e65f18299a05699595548cb27393a01b4e1dbbced82d4add8d0d55ef6514a691"; + }; + + buildInputs = + [ pkgconfig libusb1 udev ] + ++ stdenv.lib.optional enableGUI qt4 ; + + makeFlags = "udevrulesdir=$(out)/lib/udev/rules.d"; + + preConfigure = + '' + pushd libpit + ./configure + make + popd + + cd heimdall + substituteInPlace Makefile.in --replace sudo true + + # Give ownership of the Galaxy S USB device to the logged in + # user. + substituteInPlace 60-heimdall-galaxy-s.rules --replace 'MODE="0666"' 'TAG+="udev-acl"' + ''; + + postBuild = stdenv.lib.optionalString enableGUI + '' + pushd ../heimdall-frontend + substituteInPlace Source/mainwindow.cpp --replace /usr/bin $out/bin + qmake heimdall-frontend.pro OUTPUTDIR=$out/bin + make + popd + ''; + + postInstall = + '' + mkdir -p $out/share/doc/heimdall + cp ../Linux/README $out/share/doc/heimdall/ + '' + stdenv.lib.optionalString enableGUI '' + make -C ../heimdall-frontend install + ''; + + meta = { + homepage = http://www.glassechidna.com.au/products/heimdall/; + description = "A cross-platform open-source tool suite used to flash firmware onto Samsung Galaxy S devices"; + license = "bsd"; + }; +} |