summary refs log tree commit diff
path: root/pkgs/development/libraries/libssh2
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-02 11:43:15 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-04 14:54:53 +0200
commite3356b396d308264ab04cb3e997edc048af2fea2 (patch)
tree231b5bb1a0d3889fdd00361b2362db6acf8ee39e /pkgs/development/libraries/libssh2
parent487736dc6227c67ac918e3df03a7484ae2f094f3 (diff)
downloadnixpkgs-e3356b396d308264ab04cb3e997edc048af2fea2.tar
nixpkgs-e3356b396d308264ab04cb3e997edc048af2fea2.tar.gz
nixpkgs-e3356b396d308264ab04cb3e997edc048af2fea2.tar.bz2
nixpkgs-e3356b396d308264ab04cb3e997edc048af2fea2.tar.lz
nixpkgs-e3356b396d308264ab04cb3e997edc048af2fea2.tar.xz
nixpkgs-e3356b396d308264ab04cb3e997edc048af2fea2.tar.zst
nixpkgs-e3356b396d308264ab04cb3e997edc048af2fea2.zip
Revert "libssh2: Modernize Build"
This reverts commit e9ee5f99615d0980538e60b1079c8438f8d8135c.
Diffstat (limited to 'pkgs/development/libraries/libssh2')
-rw-r--r--pkgs/development/libraries/libssh2/default.nix64
1 files changed, 5 insertions, 59 deletions
diff --git a/pkgs/development/libraries/libssh2/default.nix b/pkgs/development/libraries/libssh2/default.nix
index dfaee909620..daeb39bc982 100644
--- a/pkgs/development/libraries/libssh2/default.nix
+++ b/pkgs/development/libraries/libssh2/default.nix
@@ -1,73 +1,19 @@
-{ stdenv, fetchurl
+{stdenv, fetchurlBoot, openssl, zlib}:
 
-# Optional Dependencies
-, zlib ? null
-
-# Crypto Dependencies
-, openssl ? null, libgcrypt ? null
-}:
-
-let
-  mkFlag = trueStr: falseStr: cond: name: val:
-    if cond == null then null else
-      "--${if cond != false then trueStr else falseStr}${name}${if val != null && cond != false then "=${val}" else ""}";
-  mkEnable = mkFlag "enable-" "disable-";
-  mkWith = mkFlag "with-" "without-";
-  mkOther = mkFlag "" "" true;
-
-  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};
-
-  optZlib = shouldUsePkg zlib;
-in
-
-assert crypto != null;
-
-with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "libssh2-1.5.0";
 
-  src = fetchurl {
+  src = fetchurlBoot {
     url = "${meta.homepage}/download/${name}.tar.gz";
     sha256 = "1z6hfgak00yz0azx6lk6n688mywhdxx03j6sdf95p3w6ssnnn6c3";
   };
 
-  buildInputs = [ crypto optZlib ];
-
-  configureFlags = [
-    (mkWith   (cryptoStr == "openssl")   "openssl"        null)
-    (mkWith   (cryptoStr == "libgcrypt") "libgcrypt"      null)
-    (mkWith   false                      "wicng"          null)
-    (mkWith   optZlib                    "libz"           null)
-    (mkEnable false                      "crypt-none"     null)
-    (mkEnable false                      "mac-none"       null)
-    (mkEnable true                       "gex-new"        null)
-    (mkEnable false                      "debug"          null)
-    (mkEnable false                      "examples-build" null)
-  ];
-
-  postInstall = optionalString (optZlib != null) ''
-    sed -i 's,\(-lz\),-L${optZlib}/lib \1,' $out/lib/libssh2.la
-  '' + optionalString (cryptoStr == "openssl") ''
-    sed -i 's,\(-lssl\|-lcrypto\),-L${openssl}/lib \1,' $out/lib/libssh2.la
-  '' + optionalString (cryptoStr == "libgcrypt") ''
-    sed -i 's,\(-lgcrypt\),-L${libgcrypt}/lib \1,' $out/lib/libssh2.la
-  '';
+  buildInputs = [ openssl zlib ];
 
   meta = {
     description = "A client-side C library implementing the SSH2 protocol";
     homepage = http://www.libssh2.org;
-    license = licenses.gpl2;
-    platforms = platforms.all;
-    maintainers = with maintainers; [ urkud wkennington ];
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.urkud ];
   };
 }