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

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
2024-06-30 08:16:52 +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-06-30 08:16:52 +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-06-30 08:16:52 +00:00
nativeBuildInputs = [ monotone ];
2024-05-02 00:46:19 +00:00
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = sha256;
dbs = defaultDBMirrors ++ dbs;
2024-06-30 08:16:52 +00:00
inherit
branch
cacheDB
name
selector
;
2024-05-02 00:46:19 +00:00
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
}