From cde20d69515e38b2fd45f4aa1387f52edb02885c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Tue, 19 Feb 2013 10:50:21 +0100 Subject: [PATCH] Fixing openssh hpn support for 6.1p1 I had to write a weird download derivation to overcome their download procedure. --- pkgs/tools/networking/openssh/default.nix | 25 +++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/networking/openssh/default.nix b/pkgs/tools/networking/openssh/default.nix index c1504697a186..78294d529a7c 100644 --- a/pkgs/tools/networking/openssh/default.nix +++ b/pkgs/tools/networking/openssh/default.nix @@ -1,13 +1,30 @@ -{ stdenv, fetchurl, zlib, openssl, perl, libedit, pkgconfig, pam +{ stdenv, fetchurl, zlib, openssl, perl, libedit, pkgconfig, pam, curl , etcDir ? null , hpnSupport ? false }: let - hpnSrc = fetchurl { - url = http://www.psc.edu/networking/projects/hpn-ssh/openssh-5.9p1-hpn13v12.diff.gz; - sha256 = "0h1h45vic4zks5bc5mvkc50rlgy2c219vn3rmpmalgm5hws9qjbl"; + # Ugly download + hpnSrc = stdenv.mkDerivation { + name = "openssh-6.1p1-hpn13v14.diff.gz"; + + buildInputs = [ curl ]; + + url = "http://www.psc.edu/index.php/component/remository/HPN-SSH/OpenSSH-6.1-Patches/HPN-SSH-Kitchen-Sink-Patch-for-OpenSSH-6.1/"; + + phases = [ "installPhase" ]; + + installPhase = '' + URL2=$(curl -c cookies.jar "$url" | grep "window.location" | + sed 's,.*\(http:/.*\)'"'"'},\1,') + URL3=$(curl -b cookies.jar -c cookies.jar "$URL2" | grep "window.location" | + sed 's,.*\(http:/.*\)'"'"'},\1,') + curl -b cookies.jar "$URL3" > $out + ''; + + outputHashAlgo = "sha256"; + outputHash = "14das6lim6fxxnx887ssw76ywsbvx3s4q3n43afgh5rgvs4xmnnq"; }; in