nixpkgs/pkgs/tools/security/gorilla-bin/default.nix
Eelco Dolstra ec8d41f08c
Revert "Merge pull request #28557 from obsidiansystems/binutils-wrapper"
This reverts commit 0a944b345e, reversing
changes made to 61733ed6cc.

I dislike these massive stdenv changes with unclear motivation,
especially when they involve gratuitous mass renames like NIX_CC ->
NIX_BINUTILS. The previous such rename (NIX_GCC -> NIX_CC) caused
months of pain, so let's not do that again.
2017-09-07 12:51:21 +02:00

42 lines
1.4 KiB
Nix

{ fetchurl, makeWrapper, patchelf, pkgs, stdenv, libXft, libX11, freetype, fontconfig, libXrender, libXScrnSaver, libXext }:
stdenv.mkDerivation rec {
name = "gorilla-bin-${version}";
version = "1.5.3.7";
src = fetchurl {
name = "gorilla1537_64.bin";
url = "http://gorilla.dp100.com/downloads/gorilla1537_64.bin";
sha256 = "19ir6x4c01825hpx2wbbcxkk70ymwbw4j03v8b2xc13ayylwzx0r";
};
buildInputs = [ patchelf makeWrapper ];
phases = [ "unpackPhase" "installPhase" ];
unpackCmd = ''
mkdir gorilla;
cp $curSrc gorilla/gorilla-${version};
'';
installPhase = let
interpreter = "$(< \"$NIX_CC/nix-support/dynamic-linker\")";
libPath = stdenv.lib.makeLibraryPath [ libXft libX11 freetype fontconfig libXrender libXScrnSaver libXext ];
in ''
mkdir -p $out/opt/password-gorilla
mkdir -p $out/bin
cp gorilla-${version} $out/opt/password-gorilla
chmod ugo+x $out/opt/password-gorilla/gorilla-${version}
patchelf --set-interpreter "${interpreter}" "$out/opt/password-gorilla/gorilla-${version}"
makeWrapper "$out/opt/password-gorilla/gorilla-${version}" "$out/bin/gorilla" \
--prefix LD_LIBRARY_PATH : "${libPath}"
'';
meta = {
description = "Password Gorilla is a Tk based password manager";
homepage = https://github.com/zdia/gorilla/wiki;
maintainers = [ stdenv.lib.maintainers.namore ];
platforms = [ "x86_64-linux" ];
license = stdenv.lib.licenses.gpl2;
};
}