2024-05-02 00:46:19 +00:00
|
|
|
# You can specify some extra mirrors and a cache DB via options
|
2024-05-13 21:24:10 +00:00
|
|
|
{ lib, stdenvNoCC, monotone, defaultDBMirrors ? [ ]
|
|
|
|
, cacheDB ? "./mtn-checkout.db" }:
|
2024-05-02 00:46:19 +00:00
|
|
|
# dbs is a list of strings
|
|
|
|
# each is an url for sync
|
|
|
|
|
|
|
|
# selector is mtn selector, like h:org.example.branch
|
|
|
|
#
|
2024-05-13 21:24:10 +00:00
|
|
|
{ name ? "mtn-checkout", dbs ? [ ], sha256, selector ? "h:" + branch, branch }:
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
|
|
builder = ./builder.sh;
|
2024-05-13 21:24:10 +00:00
|
|
|
nativeBuildInputs = [ monotone ];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHash = sha256;
|
|
|
|
|
|
|
|
dbs = defaultDBMirrors ++ dbs;
|
|
|
|
inherit branch cacheDB name selector;
|
|
|
|
|
|
|
|
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
|
|
|
|
|
|
|
}
|
|
|
|
|