From c8cb5210fb3db33cffae897f19551f6827fa173d Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 14 Nov 2009 20:14:21 +0000 Subject: [PATCH] * Add a fetchhg builder to checkout mercurial repositories. svn path=/nixpkgs/trunk/; revision=18347 --- pkgs/build-support/fetchhg/builder.sh | 9 +++++++++ pkgs/build-support/fetchhg/default.nix | 3 ++- pkgs/top-level/all-packages.nix | 1 - 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 pkgs/build-support/fetchhg/builder.sh diff --git a/pkgs/build-support/fetchhg/builder.sh b/pkgs/build-support/fetchhg/builder.sh new file mode 100644 index 000000000000..fbdd12b4f055 --- /dev/null +++ b/pkgs/build-support/fetchhg/builder.sh @@ -0,0 +1,9 @@ +source $stdenv/setup + +header "getting $url${tag:+ ($tag)} into $out" + +hg clone ${tag:+-r "$tag"} "$url" "$out" + +rm -rf "$out/.hg" + +stopNest diff --git a/pkgs/build-support/fetchhg/default.nix b/pkgs/build-support/fetchhg/default.nix index a7696458856c..a80835cc71fb 100644 --- a/pkgs/build-support/fetchhg/default.nix +++ b/pkgs/build-support/fetchhg/default.nix @@ -1,7 +1,8 @@ {stdenv, mercurial, nix}: {url, tag ? null, md5}: +# TODO: statically check if mercurial as the https support if the url starts woth https. stdenv.mkDerivation { - name = "fetchdarcs"; + name = "fetchhg"; builder = ./builder.sh; buildInputs = [mercurial nix]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 75e017c7151e..df7f82a7e068 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -290,7 +290,6 @@ let sshSupport = true; }; - # TODO do some testing fetchhg = import ../build-support/fetchhg { inherit stdenv mercurial nix; };