Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 31 lines 879 B view raw
1{ stdenv, fetchurl, pkgconfig, cmake, zlib, openssl, libsodium }: 2 3stdenv.mkDerivation rec { 4 pname = "libssh"; 5 version = "0.8.9"; 6 7 src = fetchurl { 8 url = "https://www.libssh.org/files/0.8/${pname}-${version}.tar.xz"; 9 sha256 = "09b8w9m5qiap8wbvz4613nglsynpk8hn0q9b929ny2y4l2fy2nc5"; 10 }; 11 12 postPatch = '' 13 # Fix headers to use libsodium instead of NaCl 14 sed -i 's,nacl/,sodium/,g' ./include/libssh/curve25519.h src/curve25519.c 15 ''; 16 17 # single output, otherwise cmake and .pc files point to the wrong directory 18 # outputs = [ "out" "dev" ]; 19 20 buildInputs = [ zlib openssl libsodium ]; 21 22 nativeBuildInputs = [ cmake pkgconfig ]; 23 24 meta = with stdenv.lib; { 25 description = "SSH client library"; 26 homepage = "https://libssh.org"; 27 license = licenses.lgpl2Plus; 28 maintainers = with maintainers; [ sander ]; 29 platforms = platforms.all; 30 }; 31}