nixpkgs/pkgs/build-support/fetchdarcs/default.nix
Benno Fünfstück e10001042d fetchbzr, fetchdarcs, fetchhg: use rev attr
This makes it match the behaviour of fetchgit and fetchsvn, so it's
easier to write scripts that support all of them.
2014-06-28 21:06:10 +02:00

14 lines
356 B
Nix

{stdenv, darcs, nix}: {url, rev ? null, context ? null, md5 ? "", sha256 ? ""}:
stdenv.mkDerivation {
name = "fetchdarcs";
builder = ./builder.sh;
buildInputs = [darcs];
outputHashAlgo = if sha256 == "" then "md5" else "sha256";
outputHashMode = "recursive";
outputHash = if sha256 == "" then md5 else sha256;
inherit url rev context;
}