2024-07-06 20:20:17 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
2022-02-24 20:38:48 +00:00
|
|
|
# Native build inputs
|
2024-07-06 20:20:17 +00:00
|
|
|
autoreconfHook,
|
|
|
|
bison,
|
|
|
|
flex,
|
|
|
|
pkg-config,
|
2022-02-24 20:38:48 +00:00
|
|
|
# Build inputs
|
2024-07-06 20:20:17 +00:00
|
|
|
expat,
|
|
|
|
gsoap,
|
|
|
|
openssl,
|
|
|
|
zlib,
|
2022-07-10 17:48:19 +00:00
|
|
|
# Configuration overridable with .override
|
|
|
|
# If not null, the builder will
|
2023-10-20 18:35:38 +00:00
|
|
|
# create a new output "etc", move "$out/etc" to "$etc/etc"
|
|
|
|
# and symlink "$out/etc" to externalEtc.
|
2024-07-06 20:20:17 +00:00
|
|
|
externalEtc ? "/etc",
|
2022-02-24 20:38:48 +00:00
|
|
|
}:
|
|
|
|
|
2024-07-06 17:19:14 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2024-07-03 09:43:43 +00:00
|
|
|
pname = "voms";
|
2024-07-06 17:19:14 +00:00
|
|
|
version = "2.1.0";
|
2022-02-24 20:38:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "italiangrid";
|
|
|
|
repo = "voms";
|
2024-07-06 17:19:14 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-Xz9+NYaSZsVuoIbyuejVWmwEmsPmMVtBAD94/SXP8ag=";
|
2022-02-24 20:38:48 +00:00
|
|
|
};
|
|
|
|
|
2022-07-10 17:48:19 +00:00
|
|
|
passthru = {
|
|
|
|
inherit externalEtc;
|
|
|
|
};
|
|
|
|
|
2022-02-24 20:38:48 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
expat
|
|
|
|
gsoap
|
|
|
|
openssl
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
2024-07-06 20:20:17 +00:00
|
|
|
outputs =
|
|
|
|
[
|
|
|
|
"bin"
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
"man"
|
|
|
|
]
|
|
|
|
# `etc` output for default configurations that can optionally be
|
|
|
|
# installed to /etc (system-wide) or profile-path>/etc.
|
2023-10-20 18:35:38 +00:00
|
|
|
++ lib.optional (externalEtc != null) "etc";
|
2022-02-24 20:38:48 +00:00
|
|
|
|
|
|
|
preAutoreconf = ''
|
|
|
|
mkdir -p aux src/autogen
|
|
|
|
'';
|
|
|
|
|
|
|
|
postAutoreconf = ''
|
|
|
|
# FHS patching
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace "/usr/bin/soapcpp2" "${gsoap}/bin/soapcpp2"
|
|
|
|
|
|
|
|
# Tell gcc about the location of zlib
|
|
|
|
# See https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=voms
|
|
|
|
export GSOAP_SSL_PP_CFLAGS="$(pkg-config --cflags gsoapssl++ zlib)"
|
|
|
|
export GSOAP_SSL_PP_LIBS="$(pkg-config --libs gsoapssl++ zlib)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-gsoap-wsdl2h=${gsoap}/bin/wsdl2h"
|
2023-10-20 18:35:38 +00:00
|
|
|
"--sysconfdir=${placeholder "out"}/etc"
|
2022-02-24 20:38:48 +00:00
|
|
|
];
|
|
|
|
|
2023-10-20 18:35:38 +00:00
|
|
|
postFixup = lib.optionalString (externalEtc != null) ''
|
|
|
|
moveToOutput etc "$etc"
|
|
|
|
ln -s ${lib.escapeShellArg externalEtc} "$out/etc"
|
2022-07-10 17:48:19 +00:00
|
|
|
'';
|
|
|
|
|
2022-02-24 20:38:48 +00:00
|
|
|
meta = with lib; {
|
2022-07-10 18:12:38 +00:00
|
|
|
description = "The C/C++ VOMS server, client and APIs v2.x";
|
2022-02-24 20:38:48 +00:00
|
|
|
homepage = "https://italiangrid.github.io/voms/";
|
|
|
|
changelog = "https://github.com/italiangrid/voms/blob/master/ChangeLog";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux; # gsoap is currently Linux-only in Nixpkgs
|
|
|
|
maintainers = with maintainers; [ ShamrockLee ];
|
|
|
|
};
|
2024-07-06 17:19:14 +00:00
|
|
|
})
|