From bb2d249706fd010c2850b159d701bbc4037fc23a Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 17 Jun 2015 00:55:16 -0700 Subject: expose librhash --- pkgs/tools/security/rhash/default.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'pkgs/tools/security/rhash') diff --git a/pkgs/tools/security/rhash/default.nix b/pkgs/tools/security/rhash/default.nix index 6a2710869bf8d..643053d9cac98 100644 --- a/pkgs/tools/security/rhash/default.nix +++ b/pkgs/tools/security/rhash/default.nix @@ -1,7 +1,8 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "rhash-1.3.3"; + version = "1.3.3"; + name = "rhash-${version}"; src = fetchurl { url = "mirror://sourceforge/rhash/${name}-src.tar.gz"; @@ -10,9 +11,23 @@ stdenv.mkDerivation rec { installFlags = [ "DESTDIR=$(out)" "PREFIX=/" ]; + # we build the static library because of two makefile bugs + # * .h files installed for static library target only + # * .so.0 -> .so link only created in the static library install target + buildPhase = '' + make lib-shared lib-static build-shared + ''; + + # we don't actually want the static library, so we remove it after it + # gets installed + installPhase = '' + make DESTDIR="$out" PREFIX="/" install-shared install-lib-shared install-lib-static + rm $out/lib/librhash.a + ''; + meta = with stdenv.lib; { homepage = http://rhash.anz.ru; - description = "Console utility for computing and verifying hash sums of files"; + description = "Console utility and library for computing and verifying hash sums of files"; platforms = platforms.linux; }; } -- cgit 1.4.1