at 18.09-beta 1.2 kB view raw
1{ stdenv, fetchurl, fetchpatch, pkgconfig, cmake, zlib, openssl, libsodium }: 2 3stdenv.mkDerivation rec { 4 name = "libssh-0.7.5"; 5 6 src = fetchurl { 7 url = "https://red.libssh.org/attachments/download/218/${name}.tar.xz"; 8 sha256 = "15bh6dm9c50ndddzh3gqcgw7axp3ghrspjpkb1z3dr90vkanvs2l"; 9 }; 10 11 patches = [ 12 # Fix mysql-workbench compilation 13 # https://bugs.mysql.com/bug.php?id=91923 14 (fetchpatch { 15 name = "include-fix-segfault-in-getissuebanner-add-missing-wrappers-in-libsshpp.patch"; 16 url = https://git.libssh.org/projects/libssh.git/patch/?id=5ea81166bf885d0fd5d4bb232fc22633f5aaf3c4; 17 sha256 = "12q818l3nasqrfrsghxdvjcyya1bfcg0idvsf8xwm5zj7criln0a"; 18 }) 19 ]; 20 21 postPatch = '' 22 # Fix headers to use libsodium instead of NaCl 23 sed -i 's,nacl/,sodium/,g' ./include/libssh/curve25519.h src/curve25519.c 24 ''; 25 26 outputs = [ "out" "dev" ]; 27 28 buildInputs = [ zlib openssl libsodium ]; 29 30 nativeBuildInputs = [ cmake pkgconfig ]; 31 32 meta = with stdenv.lib; { 33 description = "SSH client library"; 34 license = licenses.lgpl2Plus; 35 maintainers = with maintainers; [ sander ]; 36 platforms = platforms.all; 37 }; 38}