Allow easily marking a derivation as content-addressed
This commit is contained in:
parent
8def3d6c05
commit
2f45625673
@ -89,6 +89,8 @@ in rec {
|
|||||||
|
|
||||||
, patches ? []
|
, patches ? []
|
||||||
|
|
||||||
|
, __contentAddressed ? false
|
||||||
|
|
||||||
, ... } @ attrs:
|
, ... } @ attrs:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -253,6 +255,12 @@ in rec {
|
|||||||
inherit doCheck doInstallCheck;
|
inherit doCheck doInstallCheck;
|
||||||
|
|
||||||
inherit outputs;
|
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) {
|
} // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
|
||||||
cmakeFlags =
|
cmakeFlags =
|
||||||
(/**/ if lib.isString cmakeFlags then [cmakeFlags]
|
(/**/ if lib.isString cmakeFlags then [cmakeFlags]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user