rio: 0.0.36 -> 0.0.37
[NixPkgs.git] / pkgs / tools / networking / voms / default.nix
blobcafc812032b7adebf2c3d14828d9bd848d5881de
1 { lib
2 , stdenv
3 , fetchFromGitHub
4   # Native build inputs
5 , autoreconfHook
6 , bison
7 , flex
8 , pkg-config
9   # Build inputs
10 , expat
11 , gsoap
12 , openssl
13 , zlib
14   # Configuration overridable with .override
15   # If not null, the builder will
16   # create a new output "etc", move "$out/etc" to "$etc/etc"
17   # and symlink "$out/etc" to externalEtc.
18 , externalEtc ? "/etc"
21 stdenv.mkDerivation rec{
22   pname = "voms-unstable";
23   version = "2022-06-14";
25   src = fetchFromGitHub {
26     owner = "italiangrid";
27     repo = "voms";
28     rev = "8e99bb96baaf197f0f557836e2829084bb1bb00e"; # develop branch
29     hash = "sha256-FG4fHO2lsQ3t/ZaKT9xY+xqdQHfdtzi5ULtxLhdPnss=";
30   };
32   passthru = {
33     inherit externalEtc;
34   };
36   nativeBuildInputs = [
37     autoreconfHook
38     bison
39     flex
40     pkg-config
41   ];
43   buildInputs = [
44     expat
45     gsoap
46     openssl
47     zlib
48   ];
50   outputs = [ "bin" "out" "dev" "man" ]
51     ++ lib.optional (externalEtc != null) "etc";
53   preAutoreconf = ''
54     mkdir -p aux src/autogen
55   '';
57   postAutoreconf = ''
58     # FHS patching
59     substituteInPlace configure \
60       --replace "/usr/bin/soapcpp2" "${gsoap}/bin/soapcpp2"
62     # Tell gcc about the location of zlib
63     # See https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=voms
64     export GSOAP_SSL_PP_CFLAGS="$(pkg-config --cflags gsoapssl++ zlib)"
65     export GSOAP_SSL_PP_LIBS="$(pkg-config --libs gsoapssl++ zlib)"
66   '';
68   configureFlags = [
69     "--with-gsoap-wsdl2h=${gsoap}/bin/wsdl2h"
70     "--sysconfdir=${placeholder "out"}/etc"
71   ];
73   postFixup = lib.optionalString (externalEtc != null) ''
74     moveToOutput etc "$etc"
75     ln -s ${lib.escapeShellArg externalEtc} "$out/etc"
76   '';
78   meta = with lib; {
79     description = "The C/C++ VOMS server, client and APIs v2.x";
80     homepage = "https://italiangrid.github.io/voms/";
81     changelog = "https://github.com/italiangrid/voms/blob/master/ChangeLog";
82     license = licenses.asl20;
83     platforms = platforms.linux; # gsoap is currently Linux-only in Nixpkgs
84     maintainers = with maintainers; [ ShamrockLee ];
85   };