depot/pkgs/build-support/fetchmtn/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

24 lines
707 B
Nix

# You can specify some extra mirrors and a cache DB via options
{lib, stdenvNoCC, monotone, defaultDBMirrors ? [], cacheDB ? "./mtn-checkout.db"}:
lib.fetchers.withNormalizedHash { } (
# 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 ? []
, outputHash, outputHashAlgo
, selector ? "h:" + branch, branch}:
stdenvNoCC.mkDerivation {
builder = ./builder.sh;
nativeBuildInputs = [monotone];
inherit outputHash outputHashAlgo;
outputHashMode = "recursive";
dbs = defaultDBMirrors ++ dbs;
inherit branch cacheDB name selector;
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
}
)