Commit Graph

1971 Commits

Author SHA1 Message Date
Silvan Mosberger
9113696051
Merge pull request #45038 from symphorien/optopt
module system: rework module merging
2018-08-30 20:08:45 +02:00
Jan Tojnar
7d1968c0e3
Nix minimal version: 1.11 -> 2.0
Placeholders are just too convenient.
2018-08-30 08:09:54 -04:00
Jörg Thalheim
9efffe0135 hurd: cleanup unmaintained target
This has been not touched in 6 years. Let's remove it to cause less
problems when adding new cross-compiling infrastructure.
This also simplify gcc significantly.
2018-08-28 22:18:02 +01:00
Symphorien Gibol
526d604670 module system: rework module merging
The asymptotic complexity is now much lower.
2018-08-27 17:11:58 +02:00
Matthew Bauer
379fc894de Merge remote-tracking branch 'origin/master' into staging 2018-08-21 15:41:53 -05:00
CrystalGamma
72d161f548 [RFC] ppc64le enablement (#45340)
* ppc64le enablement

* gcc, glibc: properly handle __float128

* lib/systems, stdenv: syntax cleanup

* gcc7: remove ugly hack

* gcc: add/update __float128 flags

* stdenv: add another pair of quotes for consistency

* gcc: move __float128 flag for ppc64le-glibc into common/platform-flags.nix
2018-08-21 15:31:34 -04:00
Aaron Andersen
343e10aaa6 function rewritten by @Infinisil 2018-08-21 20:11:28 +02:00
Aaron Andersen
74d446176e as requested:
- moved function into strings.nix
- renamed function from makePerl5Lib
- removed duplicates entries in the resulting value
- rewrote the function from scratch after learning a few things (much cleaner now)
2018-08-21 20:11:28 +02:00
John Ericson
3cf43547f4
lib: Use lib.fixed-points.extends to avoid repetition
Another attempt after my sloppy 48ccdf322d.

@Infinisil, thanks again, reverted in 4794aa5de2 and explained my mistakes in 48ccdf322d (commitcomment-29678643). I start with their work and provide this proof of this commit's correctness:
```nix
(lib.fixedPoints.extends (lib.flip g) f) # now
((f: rattrs: self: let super = rattrs self; in super // f self super) (lib.flip g) f) # inline extends
(self: let super = f self; in super // (lib.flip g) self super) # beta reduce
(self: let super = f self; in super // g super self)  # beta reduce
(self_: let super = f self_; in super // g super self_)  # alpha rename
(self_: let super = f self_; in super // g super self_) # original, same
```

Eventually we might harmonize `overrideScope`'s `g` parameter with the general pattern, but I leave that breaking change as a separate step. Best not to refactor and break at once, and at least the abstractions make the oddity clearer.
2018-08-20 13:09:15 -04:00
Markus Kowalewski
6d95b55d3c
xfig: 3.2.5b -> 3.2.7a
init fig2dev as separate package (3.2.7a).
fig2dev was included in xfig in the previous version.
2018-08-20 00:43:11 +02:00
Markus Kowalewski
17702d0416
curl: add license 2018-08-16 21:38:59 +02:00
zimbatm
9976f37c77
Merge pull request #44896 from cdepillabout/vbox-extpack
add derivation for the virtualbox oracle extension pack
2018-08-15 18:05:07 +01:00
Profpatsch
d817452e29 lib/recursiveUpdateUntil: add a test & release note for fix 2018-08-15 17:16:56 +02:00
Mathijs Kwik
b63ec64521 lib/recursiveUpdateUntil: fix code to match documentation
$ nix repl lib
Welcome to Nix version 2.0.2. Type :? for help.

Loading 'lib'...
Added 350 variables.

-- this is the exact example from the function's documentation:
nix-repl> recursiveUpdateUntil (path: l: r: path == ["foo"]) {
                   # first attribute set
                   foo.bar = 1;
                   foo.baz = 2;
                   bar = 3;
                 } {
                   #second attribute set
                   foo.bar = 1;
                   foo.quz = 2;
                   baz = 4;
                 }
{ bar = 3; baz = 4; foo = { bar = 1; baz = 2; quz = 2; }; }

-- although the documentation says:
{
    foo.bar = 1; # 'foo.*' from the second set
    foo.quz = 2; #
    bar = 3;     # 'bar' from the first set
    baz = 4;     # 'baz' from the second set
}
2018-08-15 17:16:56 +02:00
(cdep)illabout
18869d85f9
Add the virtualbox-puel license to the licenses file. 2018-08-08 23:21:18 +09:00
Matthew Bauer
a22797d356 systems: fix netbsd triple parsing
binutils expects x86_64-unknown-netbsd<version> (only 3 parts!). Any other combo seems to fail.

Also handle darwin versions similarly.

/cc @Ericson2314
2018-07-28 19:54:09 -04:00
Bas van Dijk
ebcdb822f8 elk: 6.2.4 -> 6.3.2
* The ELK stack is upgraded to 6.3.2.

* `elasticsearch6`, `logstash6` and `kibana6` now come with X-Pack which is
  a suite of additional features. These are however licensed under the unfree
  "Elastic License".

* Fortunately they also provide OSS versions which are now packaged
  under: `elasticsearch6-oss`, `logstash6-oss` and `kibana6-oss`.
  Note that the naming of the attributes is consistent with upstream.

* The test `nix-build nixos/tests/elk.nix -A ELK-6` will test the OSS
  version by default. You can also run the test on the unfree ELK using:
  `NIXPKGS_ALLOW_UNFREE=1 nix-build nixos/tests/elk.nix -A ELK-6 --arg enableUnfree true`
2018-07-28 00:01:31 +02:00
Profpatsch
62dca7c9ab lib/trivial: move zipIntBits to its own file
The amount of implementation detail really should not be the first thing in a
prominent file called `trivial.nix`.
2018-07-26 20:36:45 +02:00
Profpatsch
af10842940 lib/trivial: unify & improve docstrings
- add section headers
- unify comment syntax
- add examples

Tested with:
nix-instantiate --strict --eval ./lib/tests/misc.nix
2018-07-26 20:36:45 +02:00
John Q Crosscompiler
7cc62144b2
systems: Allow detection of powerpc and sparc 2018-07-26 09:33:36 -04:00
volth
cc55a3ebcb treewide: fix build with disallowed aliases (#43872)
fixes build with disallowed aliases
2018-07-21 22:03:24 -04:00
volth
6d2857a311 [bot] treewide: remove unused 'inherit' in let blocks 2018-07-20 19:38:19 +00:00
volth
87f5930c3f [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
André-Patrick Bubel
0103ae2f6d
licenses: Add CC-BY-NC-4.0 2018-07-16 14:08:18 +02:00
Matthieu Coudron
5a9ba174bd lib.debug: fix traceValSeqFn
was calling the wrong parent version.
2018-07-15 09:36:08 +09:00
Silvan Mosberger
4794aa5de2
Revert "lib: Use lib.fixed-points.extends to avoid repetition"
This reverts commit 48ccdf322d9e7a68d0caf5833511ee3e53ec7d3a.
2018-07-12 02:04:06 +02:00
John Ericson
48ccdf322d lib: Use lib.fixed-points.extends to avoid repetition 2018-07-09 12:33:43 -04:00
volth
e9a6c7cebb lib.concatMap and lib.mapAttrs to be builtins 2018-07-05 03:08:00 +00:00
Matthew Bauer
dc72e8ac06 lib.generators.toPlist: add floats
Nix now supports floats & we can pretty easily map them to Plist’s
<real></real> type. Note that I am unsure how this affects older
version of Nix that may or may not have builtins.isFloat available.
Make sure this satisfies minver.nix’s "1.11" requirement.
2018-07-03 17:14:00 -04:00
Richard Marko
4a310a0404 lib: add float option type 2018-07-03 00:11:11 +02:00
Dan Peebles
ff9999ad1b linux: translate config to structured config
Instead of using a string to describe kernel config, use a nix
attribute set, then converted to a string.
- allows to override the config, aka convert 'yes' into 'modules' or
vice-versa
- while for now merging different configs is still crude (last spec wins),
at least there should be only one CONFIG_XYZ value compared to the current string
config where the first defined would be used and others ignored.

[initial idea by copumpkin in 2016, a major rebase to 2018 by teto]
2018-06-30 16:01:41 +03:00
Matthew Bauer
a44d33aac1
Merge pull request #42669 from obsidiansystems/upstream-plist
Upstream PLIST handling
2018-06-28 15:26:31 -04:00
Matthew Bauer
337b58950b generators: refactor toPlist
Address PR comments

Refactors

- Rename toPLIST -> toPlist
2018-06-28 15:24:12 -04:00
Matthew Bauer
d361371d23 generators: refactor toPLIST 2018-06-28 11:11:19 -04:00
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