about summary refs log tree commit diff
path: root/pkgs/tools/security/rhash/default.nix
blob: 40f5163d89d2f37a0e99e6bb61a1342aeb61ddb2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  version = "1.3.3";
  name = "rhash-${version}";

  src = fetchurl {
    url = "mirror://sourceforge/rhash/${name}-src.tar.gz";
    sha1 = "0981bdc98ba7ef923b1a6cd7fd8bb0374cff632e";
  };

  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 and library for computing and verifying hash sums of files";
    platforms = platforms.linux;
    maintainers = [ maintainers.andrewrk ];
  };
}