core/pkgs/build-support/fetchmtn/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
686 B
Nix
Raw Normal View History

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