From c47e78bbeccd9b535140ca0a1157b48ca3def2d2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 2 Jun 2015 11:55:30 +0200 Subject: libssh: Revert to old style --- pkgs/development/libraries/libssh/default.nix | 58 +++------------------------ 1 file changed, 5 insertions(+), 53 deletions(-) (limited to 'pkgs/development/libraries/libssh') diff --git a/pkgs/development/libraries/libssh/default.nix b/pkgs/development/libraries/libssh/default.nix index 17bcf227c0e..ef4540db2b2 100644 --- a/pkgs/development/libraries/libssh/default.nix +++ b/pkgs/development/libraries/libssh/default.nix @@ -1,37 +1,10 @@ -{ stdenv, fetchurl, pkgconfig, cmake - -# Optional Dependencies -, heimdal ? null, zlib ? null, libsodium ? null - -# Crypto Dependencies -, openssl ? null, libgcrypt ? null -}: - -let - shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null; - - # Prefer openssl - cryptoStr = if shouldUsePkg openssl != null then "openssl" - else if shouldUsePkg libgcrypt != null then "libgcrypt" - else "none"; - crypto = { - openssl = openssl; - libgcrypt = libgcrypt; - none = null; - }.${cryptoStr}; - - optHeimdal = shouldUsePkg heimdal; - optZlib = shouldUsePkg zlib; - optLibsodium = shouldUsePkg libsodium; -in - -assert crypto != null; +{ stdenv, fetchurl, pkgconfig, cmake, zlib, openssl, libsodium }: stdenv.mkDerivation rec { name = "libssh-0.7.0"; src = fetchurl { - url = "https://git.libssh.org/projects/libssh.git/snapshot/libssh-0.7.0.tar.gz"; + url = "https://git.libssh.org/projects/libssh.git/snapshot/${name}.tar.gz"; sha256 = "1wfrdqhv97f4ycd9bcpgb6gw47kr7b2iq8cz5knk8a6n9c6870k0"; }; @@ -42,35 +15,14 @@ stdenv.mkDerivation rec { sed -i 's,nacl/,sodium/,g' ./include/libssh/curve25519.h src/curve25519.c ''; - cmakeFlags = [ - "-DWITH_GSSAPI=${if optHeimdal != null then "ON" else "OFF"}" - "-DWITH_ZLIB=${if optZlib != null then "ON" else "OFF"}" - "-DWITH_SSH1=OFF" - "-DWITH_SFTP=ON" - "-DWITH_SERVER=ON" - "-DWITH_STATIC_LIB=OFF" - "-DWITH_DEBUG_CRYPTO=OFF" - "-DWITH_DEBUG_CALLTRACE=OFF" - "-DWITH_GCRYPT=${if cryptoStr == "libgcrypt" then "ON" else "OFF"}" - "-DWITH_PCAP=ON" - "-DWITH_INTERNAL_DOC=OFF" - "-DWITH_TESTING=OFF" - "-DWITH_CLIENT_TESTING=OFF" - "-DWITH_BENCHMARKS=OFF" - "-DWITH_EXAMPLES=OFF" - "-DWITH_NACL=${if optLibsodium != null then "ON" else "OFF"}" - ] ++ stdenv.lib.optionals (optLibsodium != null) [ - "-DNACL_LIBRARY=${optLibsodium}/lib/libsodium.so" - "-DNACL_INCLUDE_DIR=${optLibsodium}/include" - ]; + buildInputs = [ zlib openssl libsodium ]; - nativeBuildInputs = [ pkgconfig cmake ]; - buildInputs = [ optHeimdal optZlib optLibsodium crypto ]; + nativeBuildInputs = [ cmake pkgconfig ]; meta = with stdenv.lib; { description = "SSH client library"; license = licenses.lgpl2Plus; - maintainers = with maintainers; [ sander urkud wkennington ]; + maintainers = with maintainers; [ sander urkud ]; platforms = platforms.all; }; } -- cgit 1.4.1