1{ stdenv, fetchurl, pkgconfig, cmake, zlib, openssl, libsodium }:
2
3stdenv.mkDerivation rec {
4 name = "libssh-0.7.1";
5
6 src = fetchurl {
7 url = "https://red.libssh.org/attachments/download/154/libssh-0.7.1.tar.xz";
8 sha256 = "0v84zm957z31yyrj47n62hby38nrjk5ih0ajmgccnqrjdpwwrirg";
9 };
10
11 postPatch = ''
12 # Fix headers to use libsodium instead of NaCl
13 sed -i 's,nacl/,sodium/,g' ./include/libssh/curve25519.h src/curve25519.c
14 '';
15
16 buildInputs = [ zlib openssl libsodium ];
17
18 nativeBuildInputs = [ cmake pkgconfig ];
19
20 meta = with stdenv.lib; {
21 description = "SSH client library";
22 license = licenses.lgpl2Plus;
23 maintainers = with maintainers; [ sander urkud ];
24 platforms = platforms.all;
25 };
26}