Allow easily marking a derivation as content-addressed
This commit is contained in:
parent
8def3d6c05
commit
2f45625673
1 changed files with 8 additions and 0 deletions
|
@ -89,6 +89,8 @@ in rec {
|
|||
|
||||
, patches ? []
|
||||
|
||||
, __contentAddressed ? false
|
||||
|
||||
, ... } @ attrs:
|
||||
|
||||
let
|
||||
|
@ -253,6 +255,12 @@ in rec {
|
|||
inherit doCheck doInstallCheck;
|
||||
|
||||
inherit outputs;
|
||||
} // lib.optionalAttrs (__contentAddressed) {
|
||||
inherit __contentAddressed;
|
||||
# Provide default values for outputHashMode and outputHashAlgo because
|
||||
# most people won't care about these anyways
|
||||
outputHashAlgo = attrs.outputHashAlgo or "sha256";
|
||||
outputHashMode = attrs.outputHashMode or "recursive";
|
||||
} // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
|
||||
cmakeFlags =
|
||||
(/**/ if lib.isString cmakeFlags then [cmakeFlags]
|
||||
|
|
Loading…
Reference in a new issue