astroterm: 1.0.4 -> 1.0.6 (#378908)
[NixPkgs.git] / pkgs / by-name / li / libssh2 / package.nix
blob0239ca729c6a71999daf4730ea0c93d206364d80
2   lib,
3   stdenv,
4   fetchurl,
5   openssl,
6   zlib,
7   windows,
9   # for passthru.tests
10   aria2,
11   curl,
12   libgit2,
13   mc,
14   vlc,
17 stdenv.mkDerivation rec {
18   pname = "libssh2";
19   version = "1.11.1";
21   src = fetchurl {
22     url = "https://www.libssh2.org/download/libssh2-${version}.tar.gz";
23     hash = "sha256-2ex2y+NNuY7sNTn+LImdJrDIN8s+tGalaw8QnKv2WPc=";
24   };
26   # this could be accomplished by updateAutotoolsGnuConfigScriptsHook, but that causes infinite recursion
27   # necessary for FreeBSD code path in configure
28   postPatch = ''
29     substituteInPlace ./config.guess --replace-fail /usr/bin/uname uname
30   '';
32   outputs = [
33     "out"
34     "dev"
35     "devdoc"
36   ];
38   propagatedBuildInputs = [ openssl ]; # see Libs: in libssh2.pc
39   buildInputs = [ zlib ] ++ lib.optional stdenv.hostPlatform.isMinGW windows.mingw_w64;
41   passthru.tests = {
42     inherit
43       aria2
44       libgit2
45       mc
46       vlc
47       ;
48     curl = (curl.override { scpSupport = true; }).tests.withCheck;
49   };
51   meta = with lib; {
52     description = "Client-side C library implementing the SSH2 protocol";
53     homepage = "https://www.libssh2.org";
54     platforms = platforms.all;
55     license = with licenses; [ bsd3 ];
56     maintainers = with maintainers; [ SuperSandro2000 ];
57   };