depot/third_party/nixpkgs/pkgs/development/libraries/libssh/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

31 lines
879 B
Nix

{ stdenv, fetchurl, pkgconfig, cmake, zlib, openssl, libsodium }:
stdenv.mkDerivation rec {
pname = "libssh";
version = "0.8.8";
src = fetchurl {
url = "https://www.libssh.org/files/0.8/${pname}-${version}.tar.xz";
sha256 = "1qk5bm9r6199jbfk54f8w24vkl52051g8s3kmq4z2kdc6vbpy4jb";
};
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;
};
}