1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-12 15:47:28 +00:00
Commit graph

18 commits

Author SHA1 Message Date
Thomas Tuegel b39e491eb5
lib.makeScope: Save package set function 2017-02-27 11:49:43 -06:00
danbst 9d55479e07 add .overrideDerivation and .overrideAttrs to packages created with callPackages/callPackagesWith
nix/nixUnstable, tomcatN and postgresqlNN use `callPackages` pattern, they have .override
attribute, but lack .overrideDerivation and recent .overrideAttrs.
Packages created with `callPackage` have all of those. Because .overrideDerivation function
is used in public, without this we can break code when refactoring callPackage -> callPackages.
2017-02-12 14:00:28 +00:00
Eelco Dolstra 9d6a55aefd
~/.nixpkgs -> ~/.config/nixpkgs
The former is still respected as a fallback for config.nix for
backwards compatibility (but not for overlays because they're a new
feature).
2017-02-01 16:07:55 +01:00
Aneesh Agrawal 39b64b52ed mkDerivation: add overrideAttrs function
This is similar to `overrideDerivation`, but overrides the arguments to
`mkDerivation` instead of the underlying `derivation` call.

Also update `makeOverridable` so that uses of `overrideAttrs` can be
followed by `override` and `overrideDerivation`, i.e. they can be
mix-and-matched.
2016-10-02 11:08:34 -04:00
Vladimír Čunát ab8a691d05 nixos systemPackages: rework default outputs
- Now `pkg.outputUnspecified = true` but this attribute is missing in
  every output, so we can recognize whether the user chose or not.
  If (s)he didn't choose, we put `pkg.bin or pkg.out or pkg` into
  `systemPackages`.
- `outputsToLink` is replaced by `extraOutputsToLink`.
  We add extra outputs *regardless* of whether the user chose anything.
  It's mainly meant for outputs with docs and debug symbols.
- Note that as a result, some libraries will disappear from system path.
2016-01-28 11:24:18 +01:00
Thomas Tuegel f9e5745efa lib: add makeScope 2015-09-27 09:45:23 -05:00
Eelco Dolstra b89b6b2a7b Add function callPackagesWith
This is like callPackageWith, except that it expects the supplied
function to return a *set* of packages. It will then make the
individual packages overridable.
2015-07-28 21:42:25 +02:00
Eelco Dolstra 314e8e49ec Remove deepOverride
It's unused, and also a bad idea: because it recursively recomputes
every function argument and there is no sharing, you can get an
exponential (?) blowup in evaluation time. For example, evaluating
‘linuxPackages.kernel’ takes 0.09s and ~13 MiB, but evaluating
‘linuxPackages.kernel.deepOverride {}’ takes 3.6s and ~305 MiB.
2015-07-28 21:42:25 +02:00
Eelco Dolstra 3096d03435 Revert "Refactor mkFlag / shouldUsePkg into the nixpkgs libraries"
This reverts commit 25a148fa19.
2015-06-04 14:54:48 +02:00
William A. Kennington III 25a148fa19 Refactor mkFlag / shouldUsePkg into the nixpkgs libraries 2015-05-22 13:26:55 -07:00
Jan Malakhovski 5990cce95f lib: cleanup a little bit, add traceIf 2015-03-26 12:43:42 +00:00
Eelco Dolstra 0461f35894 Rename scrubDrv -> hydraJob and make it more effective
It now strictly evaluates all remaining attributes, preventing
unevaluated thunks that cannot be garbage-collected. It's also applied
to all jobs in Nixpkgs' release.nix.

This reduces hydra-eval-jobs' memory consumption on the 14.12
release-combined jobset from 5.1 GB to 2.0 GB.
2015-03-20 19:46:18 +01:00
Shea Levy 8921a8f53b Revert "Revert "mkOverridable: Use functors to allow overridable functions""
Original commit was reverted due to using features from a newer nix than
hydra had, hydra has since been updated

This reverts commit 07e726c85c.
2015-01-13 08:39:54 -05:00
Rob Vermaas 07e726c85c Revert "mkOverridable: Use functors to allow overridable functions"
This reverts commit 4ee556cfe9.
2015-01-13 13:53:11 +01:00
Shea Levy 4ee556cfe9 mkOverridable: Use functors to allow overridable functions 2015-01-09 13:26:34 -05:00
Luca Bruno 492dd14e78 Add overrideDerivation to makeOverridable. Closes #4017 2014-10-18 18:02:43 +02:00
Eelco Dolstra 97220c973f Replace hasAttr/getAttr calls with the ? and . operators
For NixOS evaluation, this gives a ~21% reduction in the number of
values allocated and a ~4% speedup. It's also more readable.
2014-10-05 01:11:06 +02:00
Eelco Dolstra 5fef92c4a0 Move pkgs/lib/ to lib/ 2013-10-10 13:28:21 +02:00
Renamed from pkgs/lib/customisation.nix (Browse further)