voms: default to symlink $out/etc to /etc

+15
+15
pkgs/tools/networking/voms/default.nix
··· 11 11 , gsoap 12 12 , openssl 13 13 , zlib 14 + # Configuration overridable with .override 15 + # If not null, the builder will 16 + # move "$out/etc" to "$out/etc.orig" and symlink "$out/etc" to externalEtc. 17 + , externalEtc ? "/etc" 14 18 }: 15 19 16 20 stdenv.mkDerivation rec{ ··· 22 26 repo = "voms"; 23 27 rev = "8e99bb96baaf197f0f557836e2829084bb1bb00e"; # develop branch 24 28 hash = "sha256-FG4fHO2lsQ3t/ZaKT9xY+xqdQHfdtzi5ULtxLhdPnss="; 29 + }; 30 + 31 + passthru = { 32 + inherit externalEtc; 25 33 }; 26 34 27 35 nativeBuildInputs = [ ··· 58 66 configureFlags = [ 59 67 "--with-gsoap-wsdl2h=${gsoap}/bin/wsdl2h" 60 68 ]; 69 + 70 + postFixup = '' 71 + ${lib.optionalString (externalEtc != null) '' 72 + mv "$out"/etc{,.orig} 73 + ln -s ${lib.escapeShellArg externalEtc} "$out/etc" 74 + ''} 75 + ''; 61 76 62 77 meta = with lib; { 63 78 description = "The C/C++ VOMS server, client and APIs v2.x";