2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, cmake, zlib, openssl, libsodium }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libssh";
|
2020-05-15 21:57:56 +00:00
|
|
|
version = "0.8.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.libssh.org/files/0.8/${pname}-${version}.tar.xz";
|
2020-05-15 21:57:56 +00:00
|
|
|
sha256 = "09b8w9m5qiap8wbvz4613nglsynpk8hn0q9b929ny2y4l2fy2nc5";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Fix headers to use libsodium instead of NaCl
|
|
|
|
sed -i 's,nacl/,sodium/,g' ./include/libssh/curve25519.h src/curve25519.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
# single output, otherwise cmake and .pc files point to the wrong directory
|
|
|
|
# outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
buildInputs = [ zlib openssl libsodium ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "SSH client library";
|
|
|
|
homepage = "https://libssh.org";
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
maintainers = with maintainers; [ sander ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|