Merge pull request #319401 from jtojnar/munge
munge: Fix installation paths
This commit is contained in:
commit
69802c3649
@ -1,42 +1,78 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, libgcrypt, zlib, bzip2 }:
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
autoreconfHook,
|
||||||
|
libgcrypt,
|
||||||
|
zlib,
|
||||||
|
bzip2,
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "munge";
|
pname = "munge";
|
||||||
version = "0.5.16";
|
version = "0.5.16";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "dun";
|
owner = "dun";
|
||||||
repo = "munge";
|
repo = "munge";
|
||||||
rev = "${pname}-${version}";
|
rev = "munge-${finalAttrs.version}";
|
||||||
sha256 = "sha256-fv42RMUAP8Os33/iHXr70i5Pt2JWZK71DN5vFI3q7Ak=";
|
sha256 = "sha256-fv42RMUAP8Os33/iHXr70i5Pt2JWZK71DN5vFI3q7Ak=";
|
||||||
};
|
};
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
libgcrypt # provides libgcrypt.m4
|
libgcrypt # provides libgcrypt.m4
|
||||||
];
|
];
|
||||||
buildInputs = [ libgcrypt zlib bzip2 ];
|
|
||||||
|
|
||||||
preAutoreconf = ''
|
buildInputs = [
|
||||||
# Remove the install-data stuff, since it tries to write to /var
|
libgcrypt
|
||||||
substituteInPlace src/Makefile.am --replace "etc \\" "\\"
|
zlib
|
||||||
'';
|
bzip2
|
||||||
|
];
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
|
# Load data from proper global paths
|
||||||
"--localstatedir=/var"
|
"--localstatedir=/var"
|
||||||
"--with-libgcrypt-prefix=${libgcrypt.dev}"
|
"--sysconfdir=/etc"
|
||||||
|
"--runstatedir=/run"
|
||||||
|
"--with-sysconfigdir=/etc/default"
|
||||||
|
|
||||||
|
# Install data to proper directories
|
||||||
|
"--with-pkgconfigdir=${placeholder "out"}/lib/pkgconfig"
|
||||||
|
"--with-systemdunitdir=${placeholder "out"}/lib/systemd/system"
|
||||||
|
|
||||||
|
# Cross-compilation hacks
|
||||||
|
"--with-libgcrypt-prefix=${lib.getDev libgcrypt}"
|
||||||
# workaround for cross compilation: https://github.com/dun/munge/issues/103
|
# workaround for cross compilation: https://github.com/dun/munge/issues/103
|
||||||
"ac_cv_file__dev_spx=no"
|
"ac_cv_file__dev_spx=no"
|
||||||
"x_ac_cv_check_fifo_recvfd=no"
|
"x_ac_cv_check_fifo_recvfd=no"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
installFlags = [
|
||||||
|
"localstatedir=${placeholder "out"}/var"
|
||||||
|
"runstatedir=${placeholder "out"}/run"
|
||||||
|
"sysconfdir=${placeholder "out"}/etc"
|
||||||
|
"sysconfigdir=${placeholder "out"}/etc/default"
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# rmdir will notify us if anything new is installed to the directories.
|
||||||
|
rmdir "$out"/{var{/{lib,log}{/munge,},},etc/munge}
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = ''
|
description = ''
|
||||||
An authentication service for creating and validating credentials
|
An authentication service for creating and validating credentials
|
||||||
'';
|
'';
|
||||||
license = licenses.lgpl3;
|
license = [
|
||||||
|
# MUNGE
|
||||||
|
licenses.gpl3Plus
|
||||||
|
# libmunge
|
||||||
|
licenses.lgpl3Plus
|
||||||
|
];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = [ maintainers.rickynils ];
|
maintainers = [ maintainers.rickynils ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user