Merge pull request #23573 from LnL7/darwin-gss

gss: don't build with shishi on darwin
This commit is contained in:
Franz Pletz 2017-03-07 00:31:04 +01:00 committed by GitHub
commit d102115101

View file

@ -1,9 +1,9 @@
{ stdenv, fetchurl
# Optional Dependencies
, shishi ? null
, withShishi ? !stdenv.isDarwin, shishi ? null
}:
assert withShishi -> shishi != null;
stdenv.mkDerivation rec {
name = "gss-1.0.3";
@ -12,16 +12,16 @@ stdenv.mkDerivation rec {
sha256 = "1syyvh3k659xf1hdv9pilnnhbbhs6vfapayp4xgdcc8mfgf9v4gz";
};
buildInputs = [ shishi ];
buildInputs = stdenv.lib.optional withShishi shishi;
configureFlags = [
"--${if shishi != null then "enable" else "disable"}-kereberos5"
"--${if withShishi != null then "enable" else "disable"}-kereberos5"
];
doCheck = true;
# 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
'';