diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-04-16 22:51:26 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-04-16 22:51:26 -0400 |
commit | c7ccb9f197789e424a70a878b9f967ddf38d39c6 (patch) | |
tree | df47426342467c66305e375a68f0f5850869fef4 /pkgs/stdenv/generic | |
parent | ef54604ce473400f866ec5d415271226706f113b (diff) |
make-derivation: put patches in all derivations
This puts patches in all derivations even if it unspecified by the
derivation. By default it will be an empty list. This simplifies
overrides, as we can now assume that patches is a valid name so that
this works:
self: super: {
mypkg = super.pkg.overrideAttrs (o: {
patches = o.patches ++ [ ./my-very-own.patch ];
});
}
That is, you don’t need to provide a default "or []", make-derivation
provides one for you.
Unfortunately, this is a mass rebuild.
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r-- | pkgs/stdenv/generic/make-derivation.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 417c10363b52..ad52503548af 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -86,6 +86,8 @@ in rec { , hardeningEnable ? [] , hardeningDisable ? [] + , patches ? [] + , ... } @ attrs: let @@ -235,6 +237,8 @@ in rec { ++ optional (elem "host" configurePlatforms) "--host=${stdenv.hostPlatform.config}" ++ optional (elem "target" configurePlatforms) "--target=${stdenv.targetPlatform.config}"; + inherit patches; + inherit doCheck doInstallCheck; inherit outputs; |