libgit2: fix darwin build
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib, python, libssh2, openssl, curl, http-parser, libiconv }:
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, cmake
|
||||
, zlib, python, libssh2, openssl, curl, http-parser
|
||||
, libiconv, Security
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (rec {
|
||||
name = "libgit2-${version}";
|
||||
@@ -12,11 +15,14 @@ stdenv.mkDerivation (rec {
|
||||
sha256 = "0zrrmfkfhd2xb4879z5khjb6xsdklrm01f1lscrs2ks68v25fk78";
|
||||
};
|
||||
|
||||
cmakeFlags = "-DTHREADSAFE=ON";
|
||||
cmakeFlags = [ "-DTHREADSAFE=ON" ];
|
||||
|
||||
nativeBuildInputs = [ cmake python pkgconfig ];
|
||||
|
||||
buildInputs = [ zlib libssh2 openssl http-parser curl ];
|
||||
buildInputs = [ zlib libssh2 openssl http-parser curl ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin Security;
|
||||
|
||||
propagatedBuildInputs = stdenv.lib.optional (!stdenv.isLinux) [ libiconv ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -27,6 +33,4 @@ stdenv.mkDerivation (rec {
|
||||
platforms = with platforms; all;
|
||||
};
|
||||
} // stdenv.lib.optionalAttrs (!stdenv.isLinux) {
|
||||
NIX_LDFLAGS = "-liconv";
|
||||
propagatedBuildInputs = [ libiconv ];
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user