1{ lib, stdenv, fetchFromGitHub, autoreconfHook, gawk, gnused, libgcrypt, zlib, bzip2 }:
2
3stdenv.mkDerivation rec {
4 pname = "munge";
5 version = "0.5.14";
6
7 src = fetchFromGitHub {
8 owner = "dun";
9 repo = "munge";
10 rev = "${pname}-${version}";
11 sha256 = "15h805rwcb9f89dyrkxfclzs41n3ff8x7cc1dbvs8mb0ds682c4j";
12 };
13
14 nativeBuildInputs = [ autoreconfHook gawk gnused ];
15 buildInputs = [ libgcrypt zlib bzip2 ];
16
17 preAutoreconf = ''
18 # Remove the install-data stuff, since it tries to write to /var
19 substituteInPlace src/Makefile.am --replace "etc \\" "\\"
20 '';
21
22 configureFlags = [
23 "--localstatedir=/var"
24 ];
25
26 meta = with lib; {
27 description = ''
28 An authentication service for creating and validating credentials
29 '';
30 license = licenses.lgpl3;
31 platforms = platforms.unix;
32 maintainers = [ maintainers.rickynils ];
33 };
34}