2014-08-21 00:42:50 +02:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-06-17 09:55:16 +02:00
|
|
|
version = "1.3.3";
|
|
|
|
name = "rhash-${version}";
|
2014-08-21 00:42:50 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/rhash/${name}-src.tar.gz";
|
|
|
|
sha1 = "0981bdc98ba7ef923b1a6cd7fd8bb0374cff632e";
|
2017-02-27 11:43:20 +01:00
|
|
|
sha256 = "0nii6p4m2x8rkaf8r6smgfwb1q4hpf117kkg64yr6gyqgdchnljv";
|
2014-08-21 00:42:50 +02:00
|
|
|
};
|
|
|
|
|
2017-06-13 21:37:24 +02:00
|
|
|
patches = stdenv.lib.optional stdenv.isDarwin ./darwin.patch;
|
|
|
|
|
2014-08-21 00:42:50 +02:00
|
|
|
installFlags = [ "DESTDIR=$(out)" "PREFIX=/" ];
|
|
|
|
|
2015-06-17 09:55:16 +02:00
|
|
|
# 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 = ''
|
2017-06-13 21:37:24 +02:00
|
|
|
make lib-shared lib-static build-shared CC=cc PREFIX=$out
|
2015-06-17 09:55:16 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
2014-08-21 00:42:50 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://rhash.anz.ru;
|
2015-06-17 09:55:16 +02:00
|
|
|
description = "Console utility and library for computing and verifying hash sums of files";
|
2017-06-13 17:17:03 +02:00
|
|
|
platforms = platforms.all;
|
2015-06-18 20:52:39 +02:00
|
|
|
maintainers = [ maintainers.andrewrk ];
|
2014-08-21 00:42:50 +02:00
|
|
|
};
|
|
|
|
}
|