Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1# You can specify some extra mirrors and a cache DB via options
2{
3 lib,
4 stdenvNoCC,
5 monotone,
6 defaultDBMirrors ? [ ],
7 cacheDB ? "./mtn-checkout.db",
8}:
9
10lib.fetchers.withNormalizedHash { } (
11 # dbs is a list of strings, each is an url for sync
12 # selector is mtn selector, like h:org.example.branch
13 {
14 name ? "mtn-checkout",
15 dbs ? [ ],
16 outputHash,
17 outputHashAlgo,
18 selector ? "h:" + branch,
19 branch,
20 }:
21
22 stdenvNoCC.mkDerivation {
23 builder = ./builder.sh;
24 nativeBuildInputs = [ monotone ];
25
26 inherit outputHash outputHashAlgo;
27 outputHashMode = "recursive";
28
29 dbs = defaultDBMirrors ++ dbs;
30 inherit
31 branch
32 cacheDB
33 name
34 selector
35 ;
36
37 impureEnvVars = lib.fetchers.proxyImpureEnvVars;
38
39 }
40)