* 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:
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user