Merge pull request #7934 from codyopel/ffmpeg-libssh
libssh: fix libsodium linking
This commit is contained in:
commit
a3a19e9c8c
1 changed files with 7 additions and 6 deletions
|
@ -35,8 +35,10 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0as07vz3h5qa14ysvgsddb90m1qh605p6ccv6kf1sr1k3wsbql85";
|
sha256 = "0as07vz3h5qa14ysvgsddb90m1qh605p6ccv6kf1sr1k3wsbql85";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig cmake ];
|
postPatch = ''
|
||||||
buildInputs = [ optHeimdal optZlib optLibsodium crypto ];
|
# Fix headers to use libsodium instead of NaCl
|
||||||
|
sed -i 's,nacl/,sodium/,g' ./include/libssh/curve25519.h src/curve25519.c
|
||||||
|
'';
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DWITH_GSSAPI=${if optHeimdal != null then "ON" else "OFF"}"
|
"-DWITH_GSSAPI=${if optHeimdal != null then "ON" else "OFF"}"
|
||||||
|
@ -56,13 +58,12 @@ stdenv.mkDerivation rec {
|
||||||
"-DWITH_EXAMPLES=OFF"
|
"-DWITH_EXAMPLES=OFF"
|
||||||
"-DWITH_NACL=${if optLibsodium != null then "ON" else "OFF"}"
|
"-DWITH_NACL=${if optLibsodium != null then "ON" else "OFF"}"
|
||||||
] ++ stdenv.lib.optionals (optLibsodium != null) [
|
] ++ stdenv.lib.optionals (optLibsodium != null) [
|
||||||
"-DNACL_LIBRARY=${optLibsodium}/lib"
|
"-DNACL_LIBRARY=${optLibsodium}/lib/libsodium.so"
|
||||||
"-DNACL_INCLUDE_DIR=${optLibsodium}/include"
|
"-DNACL_INCLUDE_DIR=${optLibsodium}/include"
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
nativeBuildInputs = [ pkgconfig cmake ];
|
||||||
sed -i 's,nacl/,sodium/,g' include/libssh/curve25519.h src/curve25519.c
|
buildInputs = [ optHeimdal optZlib optLibsodium crypto ];
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "SSH client library";
|
description = "SSH client library";
|
||||||
|
|
Loading…
Reference in a new issue