1{ stdenv, fetchurl }:
2
3stdenv.mkDerivation rec {
4 name = "keyutils-${version}";
5 version = "1.6";
6
7 src = fetchurl {
8 url = "https://people.redhat.com/dhowells/keyutils/${name}.tar.bz2";
9 sha256 = "05bi5ja6f3h3kdi7p9dihlqlfrsmi1wh1r2bdgxc0180xh6g5bnk";
10 };
11
12 patches = [
13 (fetchurl {
14 # improve reproducibility
15 url = "https://salsa.debian.org/debian/keyutils/raw/4cecffcb8e2a2aa4ef41777ed40e4e4bcfb2e5bf/debian/patches/Make-build-reproducible.patch";
16 sha256 = "0wnvbjfrbk7rghd032z684l7vk7mhy3bd41zvhkrhgp3cd5id0bm";
17 })
18 ];
19
20 BUILDDATE = "1970-01-01";
21 outputs = [ "out" "lib" "dev" ];
22
23 installFlags = [
24 "ETCDIR=$(out)/etc"
25 "BINDIR=$(out)/bin"
26 "SBINDIR=$(out)/sbin"
27 "SHAREDIR=$(out)/share/keyutils"
28 "MANDIR=$(out)/share/man"
29 "INCLUDEDIR=$(dev)/include"
30 "LIBDIR=$(lib)/lib"
31 "USRLIBDIR=$(lib)/lib"
32 ];
33
34 meta = with stdenv.lib; {
35 homepage = https://people.redhat.com/dhowells/keyutils/;
36 description = "Tools used to control the Linux kernel key management system";
37 license = licenses.gpl2Plus;
38 platforms = platforms.linux;
39 };
40}