* fetchsvn' now requires the MD5 hash (as computed by nix-hash') of
the tree being fetched from a Subversion repository. The revision number is now optional (and defaults to HEAD). This makes `fetchsvn' more pure. First, a URL/revision tuple does not uniquely identify a file resource, since the repository itself might change. Second, `svn:external' attributes can cause arbitrary resources to be exported. A script `nix-prefetch-svn' has been provided to determine the hash of a URL. svn path=/nixpkgs/trunk/; revision=938
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
{stdenv, subversion}: {url, rev}: stdenv.mkDerivation {
|
||||
name = "svn-checkout";
|
||||
{stdenv, subversion, nix}: {url, rev ? "HEAD", md5}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "svn-export";
|
||||
builder = ./builder.sh;
|
||||
subversion = subversion;
|
||||
url = url;
|
||||
rev = rev;
|
||||
buildInputs = [subversion nix];
|
||||
id = md5;
|
||||
inherit url rev md5;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user