Commit cc5b30c6 authored by regnat's avatar regnat
Browse files

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
parent 2f456256
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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: