Commit Graph

1875 Commits

Author SHA1 Message Date
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
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
John Ericson
cf0dd1dbd2
Merge pull request #39172 from obsidiansystems/ios-cross
ios-sdk-pkgs: Init from iOS SDK from XCode
2018-04-19 17:00:05 -04:00
Ken Micklas
ef3db7d14c ios-sdk-pkgs: Init from iOS SDK from XCode 2018-04-19 16:09:30 -04:00
John Ericson
53686e8995
Merge pull request #38485 from obsidiansystems/nixos-nixpkgs-options
nixpkgs module: Clean up platform options
2018-04-19 14:59:58 -04:00
John Wiegley
4cfdcedb71 Fix a typo: types.openSignifiantByte -> types.openSignificantByte 2018-04-13 18:41:53 -07:00
Jörg Thalheim
0fe11dbedd
Merge pull request #38611 from volth/nat-sort
lib: add naturalSort
2018-04-08 22:44:15 +01:00
volth
3f8c9106ea
lib: add naturalSort (move the example IPs to private space) 2018-04-08 13:54:39 +00:00
volth
25c2fd80b1 lib: add naturalSort 2018-04-08 13:18:13 +00:00
Silvan Mosberger
e1dee4efcb lib: make extensible
This allows the lib fixed point to be extended with

  myLib = lib.extend (self: super: {
    foo = "foo";
  })

With this it's possible to have the new modified lib attrset available to all
modules when using evalModules

  myLib.evalModules {
    modules = [ ({ lib, ... }: {
      options.bar = lib.mkOption {
	default = lib.foo;
      };
    }) ];
  }

  => { config = { bar = "foo"; ... }; options = ...; }
2018-04-07 13:21:49 -04:00
John Ericson
c6f7d43678 nixpkgs module: Clean up platform options
- `localSystem` is added, it strictly supercedes system

 - `crossSystem`'s description mentions `localSystem` (and vice versa).

 - No more weird special casing I don't even understand

TEMP
2018-04-06 12:41:44 -04:00
Profpatsch
fa71407f36 lib/generators: introduce a sane default for mkValueString
So far, `mkValueString` defaulted to `toString`,
which is a bad match for most configuration file formats,
especially because how booleans are formatted.
This also improves error messages for unsupported types.

Add a test to codify the formatting.
2018-03-29 16:53:06 +02:00
Profpatsch
a7e45fdd8e lib/generators: improve documentation a bit 2018-03-29 16:53:06 +02:00