Make it easy to build everything as content-addressed

Add a config field `contentAddressedByDefault` and an associated
environment variable `NIXPKGS_CA_BY_DEFAULT` to make every nixpkgs
derivation content-addressed by default
wip/yesman
regnat 3 years ago
parent 2f45625673
commit cc5b30c6ac
  1. 5
      pkgs/stdenv/generic/make-derivation.nix

@ -89,7 +89,10 @@ in rec {
, patches ? []
, __contentAddressed ? false
, __contentAddressed ?
(! attrs ? outputHash) # Fixed-output drvs can't be content addressed too
&& (config.contentAddressedByDefault or false
|| builtins.getEnv "NIXPKGS_CA_BY_DEFAULT" == "1")
, ... } @ attrs:

Loading…
Cancel
Save