@@ -1,7 +1,8 @@
1{ stdenv, fetchurl }:
1{ stdenv, fetchurl }:
3stdenv.mkDerivation rec {
3stdenv.mkDerivation rec {
4− name = "rhash-1.3.3";
5+ name = "rhash-${version}";
6 src = fetchurl {
7 src = fetchurl {
7 url = "mirror://sourceforge/rhash/${name}-src.tar.gz";
8 url = "mirror://sourceforge/rhash/${name}-src.tar.gz";
@@ -10,9 +11,23 @@ stdenv.mkDerivation rec {
11 installFlags = [ "DESTDIR=$(out)" "PREFIX=/" ];
12 installFlags = [ "DESTDIR=$(out)" "PREFIX=/" ];
14+ # we build the static library because of two makefile bugs
15+ # * .h files installed for static library target only
16+ # * .so.0 -> .so link only created in the static library install target
18+ make lib-shared lib-static build-shared
21+ # we don't actually want the static library, so we remove it after it
24+ make DESTDIR="$out" PREFIX="/" install-shared install-lib-shared install-lib-static
25+ rm $out/lib/librhash.a
13 meta = with stdenv.lib; {
28 meta = with stdenv.lib; {
14 homepage = http://rhash.anz.ru;
29 homepage = http://rhash.anz.ru;
15− description = "Console utility for computing and verifying hash sums of files";
30+ description = "Console utility and library for computing and verifying hash sums of files";
16 platforms = platforms.linux;
31 platforms = platforms.linux;