mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 06:01:19 +00:00
fetchmtn: support hash
attribute
This commit is contained in:
parent
3f7f5df38a
commit
54209fcd9e
@ -1,25 +1,24 @@
|
|||||||
# You can specify some extra mirrors and a cache DB via options
|
# You can specify some extra mirrors and a cache DB via options
|
||||||
{lib, stdenvNoCC, monotone, defaultDBMirrors ? [], cacheDB ? "./mtn-checkout.db"}:
|
{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
|
lib.fetchers.withNormalizedHash { } (
|
||||||
#
|
# dbs is a list of strings, each is an url for sync
|
||||||
{name ? "mtn-checkout", dbs ? [], sha256
|
# selector is mtn selector, like h:org.example.branch
|
||||||
, selector ? "h:" + branch, branch}:
|
{name ? "mtn-checkout", dbs ? []
|
||||||
|
, outputHash, outputHashAlgo
|
||||||
|
, selector ? "h:" + branch, branch}:
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
nativeBuildInputs = [monotone];
|
nativeBuildInputs = [monotone];
|
||||||
|
|
||||||
outputHashAlgo = "sha256";
|
inherit outputHash outputHashAlgo;
|
||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
outputHash = sha256;
|
|
||||||
|
|
||||||
dbs = defaultDBMirrors ++ dbs;
|
dbs = defaultDBMirrors ++ dbs;
|
||||||
inherit branch cacheDB name selector;
|
inherit branch cacheDB name selector;
|
||||||
|
|
||||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user