From 0dc26d0e7edfd6849643147b8e6c2d21ea7f5d5d Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 19 Apr 2018 21:51:40 -0500 Subject: cvs: support ssh access hacky wrapper handles ssh issues in nix builders --- pkgs/build-support/fetchcvs/builder.sh | 6 ++++++ pkgs/build-support/fetchcvs/default.nix | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'pkgs/build-support/fetchcvs') diff --git a/pkgs/build-support/fetchcvs/builder.sh b/pkgs/build-support/fetchcvs/builder.sh index 6ee594b33b2..47ae909f3ab 100644 --- a/pkgs/build-support/fetchcvs/builder.sh +++ b/pkgs/build-support/fetchcvs/builder.sh @@ -1,5 +1,11 @@ source $stdenv/setup +(echo '#!/usr/bin/env sh'; \ + echo 'echo $@'; \ + echo 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$@"') > ssh +chmod +x ssh +export CVS_RSH=$PWD/ssh + # creating the export drictory and checking out there only to be able to # move the content without the root directory into $out ... # cvs -f -d "$url" export $tag -d "$out" "$module" diff --git a/pkgs/build-support/fetchcvs/default.nix b/pkgs/build-support/fetchcvs/default.nix index 9d9deb3f629..1f7947d4d45 100644 --- a/pkgs/build-support/fetchcvs/default.nix +++ b/pkgs/build-support/fetchcvs/default.nix @@ -3,18 +3,18 @@ # tag="" (get version by tag name) # If you don't specify neither one date="NOW" will be used (get latest) -{stdenvNoCC, cvs}: +{stdenvNoCC, cvs, openssh}: {cvsRoot, module, tag ? null, date ? null, sha256}: stdenvNoCC.mkDerivation { name = "cvs-export"; builder = ./builder.sh; - nativeBuildInputs = [cvs]; + nativeBuildInputs = [cvs openssh]; outputHashAlgo = "sha256"; outputHashMode = "recursive"; outputHash = sha256; - + inherit cvsRoot module sha256 tag date; } -- cgit 1.4.1