Unverified Commit 5ddb74a3 authored by Elian Doran's avatar Elian Doran
Browse files

shibboleth-sp: fix build on darwin

parent 9cc583b9
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
{ lib, stdenv, fetchgit, autoreconfHook, boost, fcgi, openssl, opensaml-cpp, log4shib, pkg-config, xercesc, xml-security-c, xml-tooling-c }:
{ lib, stdenv, fetchgit, autoreconfHook, boost, fcgi, openssl, opensaml-cpp, log4shib, pkg-config, xercesc, xml-security-c, xml-tooling-c, darwin }:

stdenv.mkDerivation rec {
  pname = "shibboleth-sp";
@@ -11,17 +11,20 @@ stdenv.mkDerivation rec {
  };

  nativeBuildInputs = [ autoreconfHook pkg-config ];
  buildInputs = [ boost fcgi openssl opensaml-cpp log4shib xercesc xml-security-c xml-tooling-c ];
  buildInputs = [ boost fcgi openssl opensaml-cpp log4shib xercesc xml-security-c xml-tooling-c ]
    ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
      CoreServices
      SystemConfiguration
    ]);

  configureFlags = [
    "--without-apxs"
    "--with-xmltooling=${xml-tooling-c}"
    "--with-saml=${opensaml-cpp}"
    "--with-fastcgi"
    "CXXFLAGS=-std=c++14"
  ];

  env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.isDarwin) "-std=c++14";

  enableParallelBuilding = true;

  meta = with lib; {