diff options
Diffstat (limited to 'nixpkgs/pkgs/build-support/fetchmtn/default.nix')
-rw-r--r-- | nixpkgs/pkgs/build-support/fetchmtn/default.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/build-support/fetchmtn/default.nix b/nixpkgs/pkgs/build-support/fetchmtn/default.nix new file mode 100644 index 000000000000..4aa134242aa7 --- /dev/null +++ b/nixpkgs/pkgs/build-support/fetchmtn/default.nix @@ -0,0 +1,25 @@ +# 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; + +} + |