summary refs log tree commit diff
path: root/pkgs/os-specific/linux/keyutils/default.nix
blob: fc05fc234525384c2e6cfd1699991895de8a8fbb (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
{ stdenv, fetchurl, gnumake, file }:

stdenv.mkDerivation rec {
  name = "keyutils-1.5.9";
  
  src = fetchurl {
    url = "http://people.redhat.com/dhowells/keyutils/${name}.tar.bz2";
    sha256 = "1bl3w03ygxhc0hz69klfdlwqn33jvzxl1zfl2jmnb2v85iawb8jd";
  };

  buildInputs = [ file ];

  patchPhase = ''
    sed -i -e "s, /usr/bin/make, ${gnumake}/bin/make," \
        -e "s, /usr, ," \
        -e "s,\$(LNS) \$(LIBDIR)/\$(SONAME),\$(LNS) \$(SONAME)," \
        Makefile
  '';

  installPhase = "make install DESTDIR=$out";
  
  meta = with stdenv.lib; {
    homepage = http://people.redhat.com/dhowells/keyutils/;
    description = "Tools used to control the Linux kernel key management system";
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
  };
}