summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorcodyopel <codyopel@gmail.com>2015-05-21 19:13:52 -0400
committercodyopel <codyopel@gmail.com>2015-05-21 19:13:52 -0400
commit3e06aa3aa9261fc1325811d7f813df12b89cfc6a (patch)
tree8fbb6bd6ad49355d9b0cd234e9da285d986f3aad /pkgs/development
parentcc0c2647f448ff27bfa8224b57408e1b2daec714 (diff)
downloadnixpkgs-3e06aa3aa9261fc1325811d7f813df12b89cfc6a.tar
nixpkgs-3e06aa3aa9261fc1325811d7f813df12b89cfc6a.tar.gz
nixpkgs-3e06aa3aa9261fc1325811d7f813df12b89cfc6a.tar.bz2
nixpkgs-3e06aa3aa9261fc1325811d7f813df12b89cfc6a.tar.lz
nixpkgs-3e06aa3aa9261fc1325811d7f813df12b89cfc6a.tar.xz
nixpkgs-3e06aa3aa9261fc1325811d7f813df12b89cfc6a.tar.zst
nixpkgs-3e06aa3aa9261fc1325811d7f813df12b89cfc6a.zip
libssh: fix libsodium linking
resolves pkg-config errors for anything linking against libssh
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/libssh/default.nix13
1 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/development/libraries/libssh/default.nix b/pkgs/development/libraries/libssh/default.nix
index 533cdc1a709..e5d01f213cb 100644
--- a/pkgs/development/libraries/libssh/default.nix
+++ b/pkgs/development/libraries/libssh/default.nix
@@ -35,8 +35,10 @@ stdenv.mkDerivation rec {
     sha256 = "0as07vz3h5qa14ysvgsddb90m1qh605p6ccv6kf1sr1k3wsbql85";
   };
 
-  nativeBuildInputs = [ pkgconfig cmake ];
-  buildInputs = [ optHeimdal optZlib optLibsodium crypto ];
+  postPatch = ''
+    # Fix headers to use libsodium instead of NaCl
+    sed -i 's,nacl/,sodium/,g' ./include/libssh/curve25519.h src/curve25519.c
+  '';
 
   cmakeFlags = [
     "-DWITH_GSSAPI=${if optHeimdal != null then "ON" else "OFF"}"
@@ -56,13 +58,12 @@ stdenv.mkDerivation rec {
     "-DWITH_EXAMPLES=OFF"
     "-DWITH_NACL=${if optLibsodium != null then "ON" else "OFF"}"
   ] ++ stdenv.lib.optionals (optLibsodium != null) [
-    "-DNACL_LIBRARY=${optLibsodium}/lib"
+    "-DNACL_LIBRARY=${optLibsodium}/lib/libsodium.so"
     "-DNACL_INCLUDE_DIR=${optLibsodium}/include"
   ];
 
-  postPatch = ''
-    sed -i 's,nacl/,sodium/,g' include/libssh/curve25519.h src/curve25519.c
-  '';
+  nativeBuildInputs = [ pkgconfig cmake ];
+  buildInputs = [ optHeimdal optZlib optLibsodium crypto ];
 
   meta = with stdenv.lib; {
     description = "SSH client library";