gss: don't build with shishi on darwin

This commit is contained in:
Daiderd Jordan 2017-03-06 22:57:54 +01:00
parent 9256383bc2
commit a5fcca2004
No known key found for this signature in database
GPG Key ID: D02435D05B810C96

View File

@ -1,9 +1,9 @@
{ stdenv, fetchurl { stdenv, fetchurl
, withShishi ? !stdenv.isDarwin, shishi ? null
# Optional Dependencies
, shishi ? null
}: }:
assert withShishi -> shishi != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "gss-1.0.3"; name = "gss-1.0.3";
@ -12,16 +12,16 @@ stdenv.mkDerivation rec {
sha256 = "1syyvh3k659xf1hdv9pilnnhbbhs6vfapayp4xgdcc8mfgf9v4gz"; sha256 = "1syyvh3k659xf1hdv9pilnnhbbhs6vfapayp4xgdcc8mfgf9v4gz";
}; };
buildInputs = [ shishi ]; buildInputs = stdenv.lib.optional withShishi shishi;
configureFlags = [ configureFlags = [
"--${if shishi != null then "enable" else "disable"}-kereberos5" "--${if withShishi != null then "enable" else "disable"}-kereberos5"
]; ];
doCheck = true; doCheck = true;
# Fixup .la files # Fixup .la files
postInstall = stdenv.lib.optionalString (!stdenv.isDarwin && shishi != null) '' postInstall = stdenv.lib.optionalString withShishi ''
sed -i 's,\(-lshishi\),-L${shishi}/lib \1,' $out/lib/libgss.la sed -i 's,\(-lshishi\),-L${shishi}/lib \1,' $out/lib/libgss.la
''; '';