Skip to content

Commit 2ba2808

Browse files
committed
libgit2: Fix build on Windows
1 parent 966e7af commit 2ba2808

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkgs/development/libraries/libgit2/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ stdenv.mkDerivation rec {
3333
"-DUSE_HTTP_PARSER=system"
3434
"-DUSE_SSH=ON"
3535
"-DBUILD_SHARED_LIBS=${if staticBuild then "OFF" else "ON"}"
36+
] ++ lib.optionals stdenv.hostPlatform.isWindows [
37+
"-DDLLTOOL=${stdenv.cc.bintools.targetPrefix}dlltool"
38+
# For ws2_32, refered to by a `*.pc` file
39+
"-DCMAKE_LIBRARY_PATH=${stdenv.cc.libc}/lib"
3640
];
3741

3842
nativeBuildInputs = [ cmake python3 pkg-config ];

0 commit comments

Comments
 (0)