summary refs log tree commit diff
path: root/pkgs/build-support/fetchhg
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/fetchhg')
-rw-r--r--pkgs/build-support/fetchhg/builder.sh9
-rw-r--r--pkgs/build-support/fetchhg/default.nix3
2 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchhg/builder.sh b/pkgs/build-support/fetchhg/builder.sh
new file mode 100644
index 00000000000..fbdd12b4f05
--- /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 a7696458856..a80835cc71f 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];