Silvan Mosberger
2b1e2f2e97
Merge pull request #69746 from Infinisil/rem-opt-usage-message
...
lib.mkRemovedOptionModule: Show replacement for option usage too
2019-10-02 23:11:41 +02:00
Matthew Bauer
bf2e3515a8
Merge pull request #70194 from obsidiansystems/lib-more-arm
...
lib: Add armv7a-linux to doubles.nix
2019-10-01 13:34:27 -04:00
John Ericson
3098d65210
lib: Add armv7a-linux to doubles.nix
...
This is needed for android.
2019-10-01 12:51:57 -04:00
Matthieu Coudron
a4fe469d39
lib.kernel: scoped whenXXX helpers
...
whenAtLeast/whenBetween are made available in lib/kernel.nix but are now
scoped under whenXXX.
2019-10-01 16:09:07 +09:00
Matthieu Coudron
afa0e02d64
lib.kernel: make public
...
Remove the "version" parameter in order to make it more widely
available.
Starts making some kernel configuration helpers available.
The intent is to be able to better build and check the linux kernel
configuration.
2019-10-01 15:57:14 +09:00
Silvan Mosberger
c75a18fea6
mkRemovedOptionModule: assert on removed options ( #69419 )
...
mkRemovedOptionModule: assert on removed options
2019-09-30 16:39:40 +02:00
Robin Gloster
b08b0bcbbe
mkRemovedOptionModule: assert on removed options
...
We don't want to ignore config that can mess up machines. In general
this should always fail evaluation, as you think you are changing
behaviour and don't, which can easily create run-time errors we can
catch early.
2019-09-30 12:07:13 +02:00
Silvan Mosberger
ebb136da9f
lib.mkRemovedOptionModule: Show replacement for option usage too
...
Previously mkRemovedOptionModule would only show the replacement
instructions when the removed option was *defined*. With this change, it
also does so when an option is *used*.
This is essential for options that are only intended to be used such as
`security.acme.directory`, whose replacement instructions would never
trigger without this change because almost everybody only uses the
option and isn't defining it.
2019-09-28 04:10:22 +02:00
Joachim F
ad773d31e2
Merge pull request #69345 from joachifm/feat/split-version
...
Replace uses of splitString for splitting version strings
2019-09-27 06:19:18 +00:00
Joachim Fasting
2d4352b1ae
lib: basic tests for lib.versions
2019-09-26 17:42:48 +02:00
Joachim Fasting
fd3052901c
lib/versions: expose splitVersion
2019-09-26 17:42:42 +02:00
Orivej Desh
8bec8df663
licenses: refer to curl using spdx
2019-09-22 20:33:44 +00:00
Orivej Desh
698b06dfe4
qhull: specify spdx license
2019-09-22 20:22:23 +00:00
Peter Simons
c82b347947
lib: fix typo in 'zipAttrsWith' documentation
2019-09-11 19:54:36 +02:00
Robert Hensing
a96f37db10
Document attrsets.recurseIntoAttrs
2019-09-11 14:55:23 +02:00
Robert Hensing
fc64cf65ab
top-level: Fix dontRecurseIntoAttrs and include in lib
...
dontRecurseIntoAttrs was a noop (x: x), causing the expression
dontRecurseIntoAttrs (recurseIntoAttrs a) to have the wrong effect.
2019-09-11 13:12:06 +02:00
Robert Hensing
8935bfb4ac
lib: Add recurseIntoAttrs
...
This makes the function available without having to evaluate the
Nixpkgs fix-point, making it available in a more natural way for
code that deals with multiple Nixpkgs invocations.
Its definition is coupled to Nix rather than Nixpkgs, so it will
feel right at home in lib.
2019-09-11 13:12:06 +02:00
Samuel Leathers
01268fda85
20.03 is Markhor
...
* Markhor is a spiral horned animal that is on the endangered species list
* https://en.wikipedia.org/wiki/Markhor
2019-09-09 11:26:58 -04:00
Frederik Rietdijk
66bc7fc1b3
Merge master into staging-next
2019-09-06 22:46:05 +02:00
Silvan Mosberger
d1bb36d5cb
Merge pull request #67996 from roberth/cleanSourceWith-name
...
lib.cleanSourceWith: Allow name to be set, optional filter, doc
2019-09-06 21:11:12 +02:00
Robert Hensing
a0b743f47c
Fix typo in lists.nix
2019-09-06 20:02:36 +02:00
Silvan Mosberger
a4896cb4aa
lib/makeOverridable: Refactor
...
- Rename ff to result because that's what it is
- Better indentation
- Less parens
- Comment what overrideWith does
2019-09-05 00:57:55 +02:00
Silvan Mosberger
23e72eff41
lib/makeOverridable: Remove unimplemented overrideDerivation for functions
...
- Apparently nobody ever needed this
- We already have enough ways to override things
- Using overrideDerivation is discouraged
2019-09-05 00:57:22 +02:00
Silvan Mosberger
c638dac226
lib/makeOverridable: Propagate function args of the callPackage'd function
...
This allows querying function arguments of things like fetchFromGitHub:
nix-repl> lib.functionArgs pkgs.fetchFromGitHub
{ fetchSubmodules = true; githubBase = true; ... }
2019-09-05 00:57:04 +02:00
Silvan Mosberger
d54bdf5504
lib/makeOverridable: Propagate function arguments to override functions
...
This allows querying the arguments you can .override:
nix-repl> lib.functionArgs pkgs.hello.override
{ fetchurl = false; stdenv = false; }
2019-09-05 00:56:39 +02:00
Silvan Mosberger
e140d709c4
lib/makeOverridable: Abstract result overriding
2019-09-05 00:56:11 +02:00
Silvan Mosberger
a75080f58c
lib/makeOverridable: Deduplicate override definition
...
And call it overrideArgs in the let binding because that's what it does
2019-09-05 00:54:03 +02:00
Robert Hensing
9a2180fa0b
lib.cleanSourceWith: Allow name to be set, optional filter, doc
...
This change is API-compatible and hash-compatible with the previous
version.
At first I considered to write a rename function too, but adding
it name to cleanSourceWith was a no-brainer for ease of use. It
turns out that a rename function isn't any more useful than
cleanSourceWith.
To avoid having to write the identity predicate when renaming,
the filter is now optional.
builtins.path is supported since Nix 2.0 which is required by nixpkgs
2019-09-03 10:36:57 +02:00
Vladimír Čunát
f21211ebfe
Merge branch 'master' into staging
2019-09-02 23:25:24 +02:00
Gabriel Féron
4b5afe54de
Fix typo in customisation.nix
2019-09-02 13:39:40 +02:00
John Ericson
c2b34b2b57
Merge remote-tracking branch 'upstream/master' into js-unknown-ghcjs
2019-09-02 01:57:01 -04:00
John Ericson
a77a2cfe4a
lib: Further clean up systems list
2019-09-02 01:55:38 -04:00
John Ericson
f57fe63d5f
Merge lib sort into feature/js-unknown-ghcjs
2019-09-02 01:44:30 -04:00
John Ericson
3d8cf08706
lib: Sort platform predicates
2019-09-02 01:38:22 -04:00
John Ericson
c33d80c071
Merge remote-tracking branch 'upstream/master' into feature/js-unknown-ghcjs
2019-09-02 01:31:31 -04:00
Moritz Angermann
446f8c851d
Add support for js-unknown-ghcjs
...
This adds enough logic to nixpkgs to support the `js-unknown-ghcjs` triple.
2019-09-02 01:27:05 -04:00
Silvan Mosberger
03391cd336
lib/types: Make usage of types.string emit a warning
2019-08-31 18:19:15 +02:00
Frederik Rietdijk
ad1d58c622
Merge staging-next into staging
2019-08-31 10:04:20 +02:00
volth
08f68313a4
treewide: remove redundant rec
2019-08-28 11:07:32 +00:00
Frederik Rietdijk
5061fe0c2c
Merge staging-next into staging
2019-08-28 08:26:42 +02:00
Silvan Mosberger
91f6a681e0
Merge pull request #66407 from Infinisil/fix-option-rename
...
lib/modules: Use options `apply` function even if no values are defined
2019-08-27 22:06:23 +02:00
volth
35d68ef143
treewide: remove redundant quotes
2019-08-26 21:40:19 +00:00
Jan Tojnar
907529ff06
lib/options: fix path in comment
2019-08-26 02:01:49 +02:00
danbst
d80cd26ff9
Merge branch 'master' into flip-map-foreach
2019-08-18 18:00:25 +03:00
Aaron Andersen
6f6468bef3
Merge pull request #65728 from Infinisil/types-eithers
...
lib/types: Add oneOf, extension of either to a list of types
2019-08-13 11:48:42 -04:00
Silvan Mosberger
de9cb24938
lib/modules: Use options apply
function even if no values are defined
...
This allows `apply` functions to return a valid value if they completely
ignore their argument, which is the case for the option renaming
functions like `mkAliasOptionModule`. Therefore this solves issue #63693
2019-08-10 00:56:56 +02:00
Silvan Mosberger
9a44f44d4c
lib/types: Add oneOf, extension of either to a list of types
2019-08-06 14:08:42 +02:00
danbst
210c57883e
and one more place
2019-08-05 14:14:40 +03:00
Danylo Hlynskyi
7585496eff
Merge branch 'master' into flip-map-foreach
2019-08-05 14:09:28 +03:00
danbst
d0413360d3
rename foreach -> forEach
2019-08-05 14:06:20 +03:00