Commit Graph

1989 Commits

Author SHA1 Message Date
Matthew Bauer
3210dd3039 generators: add PLIST handling
/cc @LnL7 @3noch
2018-06-27 15:35:07 -04:00
xeji
249be1c560
Merge pull request #42138 from NixOS/yegortimoshenko-patch-6
lib/modules: decrease mkOptionDefault priority to 1500
2018-06-27 20:29:39 +02:00
Michael Raskin
b8ffd2459d
Merge pull request #40418 from oxij/lib/fix-module-aliases
lib, nixos: fix module aliases in presence of defaults
2018-06-27 09:24:50 +00:00
Matthew Justin Bauer
e4d9ce9061
Merge pull request #42599 from obsidiansystems/xcodever-in-system
xcode: add xcodePlatform to system
2018-06-26 10:56:57 -04:00
Matthew Bauer
0bfffbc5e1 xcode: add xcodePlatform to system
This give us a little bit more control over what target we are using.
Eventually we can target other things like WatchOS or MacOS.
2018-06-25 22:18:23 -04:00
Matthew Justin Bauer
c16eb04425
Merge pull request #42399 from obsidiansystems/xcodever-in-system
xcode: add xcodeVer to system
2018-06-25 21:59:01 -04:00
Matthew Bauer
9b0b31d981 xcode: add xcodeVer to system
This version number controls which xcode version to use when building
cross to iOS.
2018-06-25 21:57:24 -04:00
Théo Zimmermann
4033416845
Mark more unfree licenses as unfree. See also #20256. 2018-06-24 18:31:54 +02:00
Matthew Bauer
c8fd285c8d android: add ndkVer to resolve ndk ambiguity
It wasn’t exactly clear which NDK you were using previously. This adds
an attribute to system that handles what version of the NDK we should
use when building things.

/cc @Ericson2314
2018-06-22 11:06:17 -04:00
Matthew Bauer
cf09ffe9aa android: Use NDK 17 for aarch32 2018-06-22 09:33:25 -04:00
Yegor Timoshenko
441796cb16
lib/modules: bump mkOptionDefault priority to 1500 2018-06-17 23:29:16 +03:00
Ben Wolsieffer
7cb01d58b2 platforms/raspberrypi: enable kernelAutoModules 2018-06-12 20:44:23 +03:00
Jan Malakhovski
449d43fe01 lib: fix and simplify doRename
Before this change `mkRenamedOptionModule` would override option defaults
even when the old option name is left unused. For instance

```nix
{
  optios = {
    services.name.new = mkOption {
      default = { one = {}; };
    };
  };
  imports = [
    (mkRenamedOptionModule [ "services" "name" "old" ] [ "services" "name" "new" "two" ])
  ];
  config = {};
}
```

would evaluate to

`{ config.services.name.new = { two = {}; }; }`

when you'd expect it to evaluate to

`{ config.services.name.new = { one = {}; }; }`.
2018-06-11 15:06:27 +00:00
Jan Malakhovski
c0c43e9c07 lib: simplify mkAliasAndWrapDefinitions 2018-06-11 15:06:27 +00:00
Izorkin
35ce5c1c8e maxscale: init at 2.1.17 (#33835) 2018-06-10 22:50:36 +02:00
volth
3c2bbe217c lib: bitAnd, bitOr, bitXor (bitsize-agnostic fallback function) (#41491)
* lib: bitAnd, bitOr, bitXor

* lib: test for bitAnd, bitOr, bitXor

* lib: bitsize-agnostic zipIntBits

* lib: bitNot

* lib: bitNot
2018-06-10 21:25:48 +02:00
volth
4e85c4ff27 lib: add groupBy (#38612) 2018-06-10 19:31:09 +02:00
Profpatsch
f98272d6e2 Revert "lib: bitAnd, bitOr, bitXor" 2018-06-05 18:45:20 +02:00
Jörg Thalheim
d036073bcf
Merge pull request #41373 from volth/bitwise
lib: bitAnd, bitOr, bitXor
2018-06-03 11:38:56 +01:00
volth
078b9b4c2b
lib: test for bitAnd, bitOr, bitXor 2018-06-02 21:13:43 +00:00
volth
0addac3b0a lib: bitAnd, bitOr, bitXor 2018-06-01 21:36:31 +00:00
Tuomas Tynkkynen
e864247f08 Merge branch 'plat-fix-for-merge-2' into master 2018-06-01 20:08:08 +03:00
Tuomas Tynkkynen
27bb4da344 platforms.nix: More rpi2 cleanup 2018-05-31 18:06:09 +03:00
Tuomas Tynkkynen
3abdd4f1e3 platforms.nix: Clean up obsolete cruft from raspberrypi2 2018-05-31 18:06:09 +03:00
Tuomas Tynkkynen
db2988f7bd platforms.nix: Clean up obsolete cruft from raspberrypi
Works fine without, and the 'DRM n' is actually preventing the mainline
VC4 driver from building.
2018-05-31 18:06:09 +03:00
Tuomas Tynkkynen
96edbe4a0e linux_rpi: Specify defconfig in kernel expression
In particular, now the mainline kernel can be built on the RPi 1 as well
(so kernelBaseConfig should always be a mainline defconfig from now on).
And RPi 2 users can now use linux_rpi without doing the
`nixpkgs.config.platform = lib.systems.platforms.raspberrypi2;` dance.
2018-05-31 18:06:09 +03:00
John Ericson
72fa40f72d lib: Fix nix-env -qaP -f . --xml --meta
A merge undid my fix in d437f2c365.
2018-05-29 13:06:17 -04:00
Tuomas Tynkkynen
2760b24462 Merge remote-tracking branch 'upstream/master' into staging 2018-05-26 19:01:18 +03:00
Graham Christensen
951e9099c0
Merge pull request #36344 from grahamc/fancy-option-names
lib/options: teach showOptions about funny option names
2018-05-25 20:55:17 -04:00
Jan Malakhovski
ad35019501 Merge branch 'master' into staging
Fixed conflicts:
- lib/systems/for-meta.nix: in favor of staging
- pkgs/os-specific/darwin/xcode/default.nix: in favor of master
2018-05-26 00:20:17 +00:00
John Ericson
d437f2c365 lib: Fix nix-env -qaP -f . --xml --meta
The function value cannot be serialized so nix-env was mad. Turns out we can
just remove it like we do in `lib/systems/inspect.nix`.
2018-05-24 10:43:14 -04:00
Shea Levy
6da6accd30
treewide: Remove uses of builtins.toPath.
toPath has confusing semantics and is never necessary; it can always
either just be omitted or replaced by pre-concatenating `/.`. It has
been marked as "!!! obsolete?" for more than 10 years in a C++
comment, hopefully removing it will let us properly deprecate and,
eventually, remove it.
2018-05-22 16:42:02 -04:00
Tuomas Tynkkynen
003473613a Merge remote-tracking branch 'upstream/master' into staging
Conflicts:
	pkgs/top-level/all-packages.nix
2018-05-18 03:54:38 +03:00
John Ericson
c5b13f97ff
Merge pull request #40659 from bkchr/androidndk
Androidndk
2018-05-17 12:04:14 -04:00
Bastian Köcher
832a8ca087 androidndk: Fix usage as crossSystem 2018-05-17 17:22:27 +02:00
John Ericson
ddbe9191ef Merge remote-tracking branch 'upstream/master' into staging
Keep the dontCheck because the test suite fails, get rid of the LDFLAGS
hack because we don't need it!
2018-05-16 15:16:08 -04:00
Samuel Dionne-Riel
136f1c4706 doc: Fixes documented default option for <name> for submodules. (#40464)
Fixes #40463

This is related to change 1d56d0c8a7
2018-05-16 18:11:36 +02:00
John Ericson
f2017c40ae Merge remote-tracking branch 'upstream/master' into staging 2018-05-14 22:53:10 -04:00
Matthew Justin Bauer
165c151f7a
Merge pull request #34805 from rycee/fix/dorename
lib: make use of visible variable in doRename
2018-05-14 18:08:26 -05:00
Frederik Rietdijk
658b7c3f2e Merge master into staging 2018-05-13 12:13:25 +02:00
John Ericson
2c5d915200 Merge commit '92b7a814f26ee1d37e989431c18518c67285a332' into staging 2018-05-13 01:02:09 -04:00
Matthew Justin Bauer
f799042d41
Merge pull request #39447 from oxij/nixos/warn-missing-stateversion
nixos: warn on missing `stateVersion`
2018-05-12 14:45:06 -05:00
Jan Malakhovski
4017fdcafd lib: modules: propagate highestPrio
Yeah, it's ugly. But it's the minimal change that doesn't break anything
else.
2018-05-12 19:27:09 +00:00
John Ericson
92b7a814f2 Merge branch 'fix-gcc-with-float' 2018-05-12 15:21:30 -04:00
John Ericson
f2004e6287 lib: Fix float handling for Aarch32
Forgot to adjust default so abi with explicit float attr would be used.
2018-05-12 15:18:31 -04:00
John Ericson
6f40d18d44 prebuilt android cc: Edit wrapper to pass the right -m flags for armv7a
(cherry picked from commit 827ef09140)
2018-05-12 15:16:16 -04:00
John Ericson
6a96dc0417 lib/system: Remove float from androideabi
There are two different official variations which differ in their float
support, so such a blanket statement is invalid.
`lib.systems.platforms.*android` already handles each case correctly.

Correcting an error in 827ef09140.
2018-05-11 20:16:28 -04:00
John Ericson
827ef09140 prebuilt android cc: Edit wrapper to pass the right -m flags for armv7a 2018-05-11 19:17:35 -04:00
John Ericson
28bacc2093 lib/systems: Add assertion to "android" ABI
This is analogous to the GNU assertion.
2018-05-11 19:03:07 -04:00
John Ericson
f4de669777 lib/systems/inspect: Fix after assertions
Function are never equal in Nix, so we need to filter out this attribute
in ABIs.
2018-05-11 19:02:50 -04:00
John Ericson
98a1b89945
Merge pull request #40385 from obsidiansystems/lib-android-platforms
lib: Add 32-bit Android platforms
2018-05-11 19:01:22 -04:00
John Ericson
e3f6c6d18d lib: Add 32-bit Android platforms 2018-05-11 18:41:55 -04:00
John Ericson
81387c2e78 Merge remote-tracking branch 'upstream/master' into staging 2018-05-11 17:12:04 -04:00
John Ericson
0a77a72895
Merge pull request #40378 from obsidiansystems/lib-platform-sort
lib/systems: Sort platforms, and space CPUs
2018-05-11 17:10:49 -04:00
John Ericson
341794a4b9 lib/systems: Sort platforms, and space CPUs 2018-05-11 15:02:18 -04:00
John Ericson
ee4b56edd3 Merge remote-tracking branch 'upstream/master' into staging 2018-05-11 14:36:08 -04:00
John Ericson
9e9cdd7027 lib: Add more configure flag helpers
Add with/without to match enable/disable, and add
`--{enable,with}-key=value` versions of both.
2018-05-11 17:43:35 +02:00
John Ericson
f18ddabee7 Merge remote-tracking branch 'upstream/master' into lib-float 2018-05-10 18:13:00 -04:00
John Ericson
1fe81a4bcd lib: Clean up float/fpu options
ARM ABIs now have a float field. This is used as a fallback to lessen
our use of `platform.gcc.float`. I didn't know what the MIPs convention
is so I kept using `platform.gcc.float` in that case.
2018-05-10 18:02:00 -04:00
Matthew Justin Bauer
4ec9c4b377
Merge pull request #40255 from matthewbauer/remove-enableIfAvailable
treewide: remove lib.meta.enableIfAvailable
2018-05-10 16:00:16 -05:00
John Ericson
67db915a43 Merge remote-tracking branch 'upstream/master' into staging 2018-05-10 16:35:04 -04:00
John Ericson
58b2e875c2 lib/systems: Prohibit "gnu" ABI (*-gnu) with 32-bit ARM
It is ambiguous, and therefore banned within GCC.
2018-05-10 15:05:23 -04:00
Frederik Rietdijk
64c8c6dcb3 Merge master into staging 2018-05-10 09:30:56 +02:00
John Ericson
006422d08d Merge commit 'feb648ce59ffbed94c58133eb7aa2761992a35e1' into staging 2018-05-10 01:55:26 -04:00
John Ericson
c17f79ea3b Merge remote-tracking branch 'upstream/master' into lib-platform-simplify 2018-05-10 01:40:44 -04:00
John Ericson
feb648ce59 Merge commit '70963b382f3f820ba6d3bc3b3aaf50a2957ec1ff' into lib-platform-simplify 2018-05-10 01:40:38 -04:00
John Ericson
a02be2bd85 treewide: Get rid of *Platform.arch
Use `parsed.cpu.name` or `platform.gcc.arch` instead.
2018-05-10 01:37:31 -04:00
John Ericson
3bc923bf5f Merge remote-tracking branch 'upstream/master' into uclibc 2018-05-10 00:23:12 -04:00
John Ericson
b3ef322770 Merge commit '70963b382f3f820ba6d3bc3b3aaf50a2957ec1ff' into uclibc 2018-05-10 00:18:51 -04:00
John Ericson
f063a860d6 xbursttools: Cleanup slightly 2018-05-09 23:40:13 -04:00
John Ericson
e42a7a5c0b lib/systems: Add uClibc just like MUSL 2018-05-09 23:39:23 -04:00
John Ericson
0b45f0ebf9
Merge pull request #40261 from obsidiansystems/more-arm
lib/systems: Parse more arm cpu types
2018-05-09 20:05:10 -04:00
John Ericson
3fa0ba9177 lib/systems: Parse more arm cpu types 2018-05-09 18:57:39 -04:00
Matthew Bauer
c37b93bd52 treewide: remove lib.meta.enableIfAvailable 2018-05-09 16:21:22 -05:00
Matthew Bauer
8a98cf97e9 lib.makeSearchPath: allow null in search path
This makes things match ‘buildInputs’ where inputs are allowed to be
null.
2018-05-09 15:44:06 -05:00
Matthew Bauer
6748534d83 Merge remote-tracking branch 'upstream/master' into staging 2018-05-08 09:36:00 -05:00
Robert Helgesson
08e8701673
lib.types: fix loaOf behavior for long lists
Assigning a list of 10 or more elements to an option having the type
`loaOf a` produces a configuration value that is not honoring the
order of the original list. This commit fixes this and a related issue
arising when 10 or more lists are merged into this type of option.
2018-05-07 20:23:52 +02:00
Silvan Mosberger
facd51575e lib/types: remove unnecessary coerceFunc assertion 2018-05-06 23:58:36 +02:00
Silvan Mosberger
cd5736116c lib/types: clear up coercedTo description 2018-05-06 23:58:36 +02:00
Silvan Mosberger
b16a69289a lib/types: Add coercedTo unsound tests 2018-05-06 23:58:36 +02:00
Silvan Mosberger
ef8996f15e lib/types: Fix coercedTo check
Without this change

  (coercedTo str toInt int).check "foo"

would evaluate to true, even though

  (coercedTo str toInt int).merge {} [{ value = "foo"; }]

will throw an error because "foo" can't be coerced to an int.
2018-05-06 23:58:36 +02:00
Ben Gamari
8b32cfdbc0 lib.systems.gnu: Accept gnueabi as a gnu platform 2018-05-03 17:06:01 -04:00
John Ericson
db4f96b3cb lib/systems: Fix eval for iphone32* examples
Whoops messed up 9a845de873 slightly.
2018-05-01 13:04:57 -04:00
John Ericson
9a845de873 lib/systems: Update iOS examples
The commented-out configs are @shlevy's old known-good ones. I changed
them as needed to play nice with lib.systems.parse but did not test so
leaving them as comments for now.
2018-05-01 01:16:27 -04:00
John Ericson
af55a0c300
Merge pull request #39788 from obsidiansystems/aarch32-for-master
lib: Improve deprecation message for `isArm`
2018-04-30 23:28:45 -04:00
John Ericson
57723e947a Merge remote-tracking branch 'upstream/master' into aarch32 2018-04-30 23:06:59 -04:00
Maximilian Bosch
9274ea3903
treewide: rename version attributes
As suggested in https://github.com/NixOS/nixpkgs/pull/39416#discussion_r183845745
the versioning attributes in `lib` should be consistent to
`nixos/version` which implicates the following changes:

* `lib.trivial.version` -> `lib.trivial.release`
* `lib.trivial.suffix` -> `lib.trivial.versionSuffix`
* `lib.nixpkgsVersion` -> `lib.version`

As `lib.nixpkgsVersion` is referenced several times in `NixOS/nixpkgs`,
`NixOS/nix` and probably several user's setups. As the rename will cause
a notable impact it's better to keep `lib.nixpkgsVersion` as alias with
a warning yielded by `builtins.trace`.
2018-04-28 14:23:53 +02:00
Maximilian Bosch
39909289f4
lib: deduplicate version/suffix references
The logic regarding the generated `.version-suffix` file is already
defined in `lib/trivial.nix` and shouldn't be duplicated in
`nixos/version`.
2018-04-28 14:23:13 +02:00
Profpatsch
900cec79a0 lib/debug: add replacement instructions & release notes
for every deprecated function.
2018-04-27 18:59:39 +02:00
Profpatsch
5012c49fc0 lib/debug: document module & functions, prune imports 2018-04-27 18:59:39 +02:00
Profpatsch
e49f40e1ca lib/debug: deprecate traceCallXml
Incompletely documented, and a FIXME/bug that has been there for years.
2018-04-27 18:59:39 +02:00
Profpatsch
fd54a946ca lib/debug: deprecate addErrorContextToAttrs
The function isn’t used anywhere and `addErrorContext` is an undocumented
builtin.
The builtin is explicitely qualified at its two uses in the module system.
2018-04-27 18:59:39 +02:00
Profpatsch
562286aa56 lib/debug: deprecate traceValIfNot
The function is only used in exactly one module and overly specific (`c` must be
a true predicate for `x`, if not, a specific trace is called).
2018-04-27 18:59:39 +02:00
Profpatsch
7365671fb2 lib/debug: deprecate attrNamesToStr, traceXMLVal(Marked)
`attrNamesToStr` is very specific (and pretty trivial), so it doesn’t make sense
to have it in the library.
`traceXMLVal(Marked)` are just a builtin and `trace` and not very useful in
general (trace output should not be parsed anyway).
2018-04-27 18:59:39 +02:00
Profpatsch
a7fdd10bf3 lib/debug: deprecate & modernize showVal
The code is re-implemented in terms of `generators.toPretty`, but is strictly
less general than `traceValSeqN`, so we deprecate it.
2018-04-27 18:59:39 +02:00
Profpatsch
a455637d28 lib/debug: remove the deprecated strict function
The grace period was long enough.
2018-04-27 18:59:39 +02:00
Profpatsch
a5f6cdfd7e lib/debug: add traceValFn, traceValSeqFn, traceValSeqNFn
Being able to modify the value on-the-fly before printing is very useful in
practice.
2018-04-27 18:59:39 +02:00
John Ericson
b9acfb4ecf treewide: isArm -> isAarch32
Following legacy packing conventions, `isArm` was defined just for
32-bit ARM instruction set. This is confusing to non packagers though,
because Aarch64 is an ARM instruction set.

The official ARM overview for ARMv8[1] is surprisingly not confusing,
given the overall state of affairs for ARM naming conventions, and
offers us a solution. It divides the nomenclature into three levels:

```
ISA:             ARMv8   {-A, -R, -M}
                 /    \
Mode:     Aarch32     Aarch64
             |         /   \
Encoding:   A64      A32   T32
```

At the top is the overall v8 instruction set archicture. Second are the
two modes, defined by bitwidth but differing in other semantics too, and
buttom are the encodings, (hopefully?) isomorphic if they encode the
same mode.

The 32 bit encodings are mostly backwards compatible with previous
non-Thumb and Thumb encodings, and if so we can pun the mode names to
instead mean "sets of compatable or isomorphic encodings", and then
voilà we have nice names for 32-bit and 64-bit arm instruction sets
which do not use the word ARM so as to not confused either laymen or
experienced ARM packages.

[1]: https://developer.arm.com/products/architecture/a-profile

(cherry picked from commit ba52ae5048)
2018-04-25 15:50:41 -04:00
John Ericson
ba52ae5048 treewide: isArm -> isAarch32
Following legacy packing conventions, `isArm` was defined just for
32-bit ARM instruction set. This is confusing to non packagers though,
because Aarch64 is an ARM instruction set.

The official ARM overview for ARMv8[1] is surprisingly not confusing,
given the overall state of affairs for ARM naming conventions, and
offers us a solution. It divides the nomenclature into three levels:

```
ISA:             ARMv8   {-A, -R, -M}
                 /    \
Mode:     Aarch32     Aarch64
             |         /   \
Encoding:   A64      A32   T32
```

At the top is the overall v8 instruction set archicture. Second are the
two modes, defined by bitwidth but differing in other semantics too, and
buttom are the encodings, (hopefully?) isomorphic if they encode the
same mode.

The 32 bit encodings are mostly backwards compatible with previous
non-Thumb and Thumb encodings, and if so we can pun the mode names to
instead mean "sets of compatable or isomorphic encodings", and then
voilà we have nice names for 32-bit and 64-bit arm instruction sets
which do not use the word ARM so as to not confused either laymen or
experienced ARM packages.

[1]: https://developer.arm.com/products/architecture/a-profile
2018-04-25 15:28:55 -04:00
Profpatsch
c84dad316a lib/generators: print paths without quotes & move function down 2018-04-25 15:31:17 +02:00