Files
nixpkgs/pkgs/by-name/li/libssh2/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

59 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchurl,
openssl,
zlib,
windows,
# for passthru.tests
aria2,
curl,
libgit2,
mc,
vlc,
}:
stdenv.mkDerivation rec {
pname = "libssh2";
version = "1.11.1";
src = fetchurl {
url = "https://www.libssh2.org/download/libssh2-${version}.tar.gz";
hash = "sha256-2ex2y+NNuY7sNTn+LImdJrDIN8s+tGalaw8QnKv2WPc=";
};
# this could be accomplished by updateAutotoolsGnuConfigScriptsHook, but that causes infinite recursion
# necessary for FreeBSD code path in configure
postPatch = ''
substituteInPlace ./config.guess --replace-fail /usr/bin/uname uname
'';
outputs = [
"out"
"dev"
"devdoc"
];
propagatedBuildInputs = [ openssl ]; # see Libs: in libssh2.pc
buildInputs = [ zlib ] ++ lib.optional stdenv.hostPlatform.isMinGW windows.mingw_w64;
passthru.tests = {
inherit
aria2
libgit2
mc
vlc
;
curl = (curl.override { scpSupport = true; }).tests.withCheck;
};
meta = with lib; {
description = "Client-side C library implementing the SSH2 protocol";
homepage = "https://www.libssh2.org";
platforms = platforms.all;
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ SuperSandro2000 ];
};
}