3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

1991 commits

Author SHA1 Message Date
John Ericson 22ce614112
Merge pull request #47238 from obsidiansystems/overrideScope-order
lib: Deprecate `overrideScope` in lieu of `overrideScope'` taking arguments in the conventional order
2018-09-24 18:04:18 -04:00
John Ericson b9dce11712 lib: Make overrideScope' which takes arguments in the conventional order
The `overrideScope` bound by `makeScope` (via special `callPackage`)
took an override in the form `super: self { … }`. But this is
dangerously close to the `self: super { … }` form used by *everything*
else, even other definitions of `overrideScope`! Since that
implementation did not even share any code either until I changed it
recently in 3cf43547f4, this inconsistency
is almost certainly an oversight and not intentional.

Unfortunately, just as the inconstency is hard to debug if one just
assumes the conventional order, any sudden fix would break existing
overrides in the same hard-to-debug way. So instead of changing the
definition a new `overrideScope'` with the conventional order is added,
and old `overrideScope` deprecated with a warning saying to use
`overrideScope'` instead. That will hopefully get people to stop using
`overrideScope`, freeing our hand to change or remove it in the future.
2018-09-24 17:50:11 -04:00
Jörg Thalheim 83d89edc6e
Merge pull request #46336 from Infinisil/overrideExisting
lib: Improve overrideExisting implementation
2018-09-18 11:37:30 +01:00
John Ericson 226d574870 Merge remote-tracking branch 'upstream/master' into darwin-android-ndk-for-master 2018-09-17 22:48:25 -04:00
John Ericson 6769437186 androidndk: Add Darwin support
Also switch Linux to using the official sha1 hashes for consistency.
They are gotten from https://developer.android.com/ndk/downloads/.
2018-09-17 22:34:37 -04:00
Silvan Mosberger c7104d97c8
lib.overrideExisting: Better example 2018-09-17 23:28:47 +02:00
Silvan Mosberger afd8620621
lib/tests: Add overrideExisting tests 2018-09-17 22:40:08 +02:00
Graham Christensen 4c7f0714c9
Merge pull request #36287 from shlevy/lib-tests-default
lib/tests: Add check-eval.nix to run simple tests.
2018-09-16 18:38:47 -04:00
Maximilian Bosch 6d6cbd316d pythonmagick: fix build (#46469)
The original build broke with the following linker issue:

```
  CXXLD    _PythonMagick.la
/nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/ld: cannot find -l-L/nix/store/4gh6ynzsd5ndx37hmkl62xa8z30k43y1-imagemagick-6.9.9-34/lib
collect2: error: ld returned 1 exit status
```

This happens since `BOOST_PYTHON_LIB` wasn't set properly, however
`_PythonMagick.la` was linked with `-l$(BOOST_PYTHON_LIB)
$(MAGICK_LIBS)`. With an empty `BOOST_PYTHON_LIB` the linker got
confused.

To work around this, the `boost` library directory needs to be specified
explicitly. To ensure that the changes take effect, the original
`configure` script shipped with `$src` needs to be removed and recreated
using the `autoreconfHook`.

Additionally the `imagemagick` license (https://spdx.org/licenses/ImageMagick.html)
needs to be added to `lib/licenses.nix` to document the proper license
of `pythonmagick` in the meta section.
2018-09-10 11:59:51 +02:00
Silvan Mosberger 5cfdec6e94
lib: Improve overrideExisting implementation 2018-09-07 21:00:14 +02:00
Profpatsch efdf618330 lib: move assertMsg and assertOneOf to their own library file
Since the `assertOneOf` uses `lib.generators`, they are not really trivial
anymore and should go into their own library file.
2018-09-06 18:14:27 +02:00
Profpatsch 3e45b61a99 lib/trivial: add a few examples of usage of assertMsg/assertOneOf 2018-09-06 18:14:27 +02:00
Profpatsch 320cdecd16 lib/trivial: add assertOneOf 2018-09-06 18:14:27 +02:00
Profpatsch 0e2aa97f3a lib/trivial: add assertMsg 2018-09-06 18:14:27 +02:00
Shea Levy 18337f3ece
Merge branch 'no-toPath' 2018-09-06 08:09:53 -04:00
xeji c23ec2794d
Merge pull request #46011 from markuskowa/homepages-2
Cleanup homepage links
2018-09-03 23:32:52 +02:00
Markus Kowalewski 7422953eb0
lsof: add license + update homepage
lib/licenses: add purdue style BSD license
2018-09-03 22:36:27 +02:00
Vladimír Čunát 608730af44
lib/trivial.nix: fix missing parens
Broken in 62dca7c9a; the tricky thing is that it depends on nix version.
Explanation: https://github.com/NixOS/nix/issues/629
2018-09-03 14:18:26 +02:00
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 48ccdf322d.
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