* updated darcs to 1.0.5, added curl dependency

* added an experimental fetchdarcs function, based on fetchsvn
  (there are no expressions yet that use this function)

svn path=/nixpkgs/trunk/; revision=4615
This commit is contained in:
Andres Löh
2006-01-30 11:18:38 +00:00
parent 105150e281
commit 70c36821c6
4 changed files with 49 additions and 7 deletions
+22
View File
@@ -0,0 +1,22 @@
source $stdenv/setup
tagtext=""
tagflags=""
if test -n "$tag"; then
tagtext="(tag $tag) "
tagflags="--tag=$tag"
fi
header "getting $url ${tagtext}into $out"
darcs get --no-pristine-tree $tagflags "$url" "$out"
# remove metadata, because it can change
rm -rf "$out/_darcs"
actual=$(nix-hash $out)
if test "$actual" != "$outputHash"; then
echo "hash is $actual, expected $outputHash" >&2
exit 1
fi
stopNest
+16
View File
@@ -0,0 +1,16 @@
{stdenv, darcs, nix}: {url, tag ? null, md5}:
stdenv.mkDerivation {
name = "fetchdarcs";
builder = ./builder.sh;
buildInputs = [darcs nix];
# Nix <= 0.7 compatibility.
id = md5;
outputHashAlgo = "md5";
outputHashMode = "recursive";
outputHash = md5;
inherit url tag;
}