2009-07-07 12:02:09 +02:00
|
|
|
# You can specify some extra mirrors and a cache DB via options
|
2011-08-23 19:45:40 +02:00
|
|
|
{stdenv, monotone, defaultDBMirrors ? [], cacheDB ? "./mtn-checkout.db"}:
|
2009-07-07 12:02:09 +02:00
|
|
|
# dbs is a list of strings
|
|
|
|
# each is an url for sync
|
|
|
|
|
|
|
|
# selector is mtn selector, like h:org.example.branch
|
|
|
|
#
|
2011-08-23 19:45:40 +02:00
|
|
|
{name ? "mtn-checkout", dbs ? [], sha256
|
|
|
|
, selector ? "h:" + branch, branch}:
|
2009-07-07 12:02:09 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
builder = ./builder.sh;
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [monotone];
|
2009-07-07 12:02:09 +02:00
|
|
|
|
2011-08-23 19:45:40 +02:00
|
|
|
outputHashAlgo = "sha256";
|
2009-07-07 12:02:09 +02:00
|
|
|
outputHashMode = "recursive";
|
2011-08-23 19:45:40 +02:00
|
|
|
outputHash = sha256;
|
2009-07-07 12:02:09 +02:00
|
|
|
|
|
|
|
dbs = defaultDBMirrors ++ dbs;
|
2011-08-23 19:45:40 +02:00
|
|
|
inherit branch cacheDB name selector;
|
2009-07-07 12:02:09 +02:00
|
|
|
|
|
|
|
impureEnvVars = [
|
|
|
|
# We borrow these environment variables from the caller to allow
|
|
|
|
# easy proxy configuration. This is impure, but a fixed-output
|
|
|
|
# derivation like fetchurl is allowed to do so since its result is
|
|
|
|
# by definition pure.
|
|
|
|
"http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy"
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|