summary refs log blame commit diff
path: root/pkgs/build-support/fetchmtn/default.nix
blob: 7ce67453d698b0f62407a3854e3c061818662678 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                               
                                                                             




                                                     

                                        
 
                         
                         
                                 
 
                            
                               
                      

                                
                                       
 
                                                             
 

 
# You can specify some extra mirrors and a cache DB via options
{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 = stdenvNoCC.lib.fetchers.proxyImpureEnvVars;

}