nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 78 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 autoreconfHook, 6 libgcrypt, 7 zlib, 8 bzip2, 9}: 10 11stdenv.mkDerivation (finalAttrs: { 12 pname = "munge"; 13 version = "0.5.16"; 14 15 src = fetchFromGitHub { 16 owner = "dun"; 17 repo = "munge"; 18 rev = "munge-${finalAttrs.version}"; 19 sha256 = "sha256-fv42RMUAP8Os33/iHXr70i5Pt2JWZK71DN5vFI3q7Ak="; 20 }; 21 22 nativeBuildInputs = [ 23 autoreconfHook 24 libgcrypt # provides libgcrypt.m4 25 ]; 26 27 buildInputs = [ 28 libgcrypt 29 zlib 30 bzip2 31 ]; 32 33 strictDeps = true; 34 35 configureFlags = [ 36 # Load data from proper global paths 37 "--localstatedir=/var" 38 "--sysconfdir=/etc" 39 "--runstatedir=/run" 40 "--with-sysconfigdir=/etc/default" 41 42 # Install data to proper directories 43 "--with-pkgconfigdir=${placeholder "out"}/lib/pkgconfig" 44 "--with-systemdunitdir=${placeholder "out"}/lib/systemd/system" 45 46 # Cross-compilation hacks 47 "--with-libgcrypt-prefix=${lib.getDev libgcrypt}" 48 # workaround for cross compilation: https://github.com/dun/munge/issues/103 49 "ac_cv_file__dev_spx=no" 50 "x_ac_cv_check_fifo_recvfd=no" 51 ]; 52 53 installFlags = [ 54 "localstatedir=${placeholder "out"}/var" 55 "runstatedir=${placeholder "out"}/run" 56 "sysconfdir=${placeholder "out"}/etc" 57 "sysconfigdir=${placeholder "out"}/etc/default" 58 ]; 59 60 postInstall = '' 61 # rmdir will notify us if anything new is installed to the directories. 62 rmdir "$out"/{var{/{lib,log}{/munge,},},etc/munge} 63 ''; 64 65 meta = with lib; { 66 description = '' 67 An authentication service for creating and validating credentials 68 ''; 69 license = [ 70 # MUNGE 71 licenses.gpl3Plus 72 # libmunge 73 licenses.lgpl3Plus 74 ]; 75 platforms = platforms.unix; 76 maintainers = [ maintainers.rickynils ]; 77 }; 78})