Commit Graph

2112 Commits

Author SHA1 Message Date
Jan Tojnar
aead6e12f9
Merge remote-tracking branch 'upstream/master' into staging 2018-12-16 22:55:06 +01:00
volth
bb9557eb7c lib.makePerlPath -> perlPackages.makePerlPath 2018-12-15 03:50:31 +00:00
Alyssa Ross
b450083ee3
Merge pull request #51884 from alyssais/bundlerEnv-groups
bundlerEnv: improve handling of groups
2018-12-12 23:51:52 +00:00
Jörg Thalheim
554851e689
platform.emulator: fix non-x86 systems 2018-12-12 08:00:07 +00:00
Etienne Laurin
328fbcff60 ikos: init at 2.1 2018-12-12 00:09:24 +00:00
Alyssa Ross
67b1265fb3
bundlerEnv: ensure dependencies always included
Suppose I have a Gemfile like this:

    source "https://rubygems.org"
    gem "actioncable"
    gem "websocket-driver", group: :test

The gemset.nix generated by Bundix 2.4.1 will set ActionCable's groups
to [ "default" ], and websocket-driver's to [ "test" ]. This means that
the generated bundlerEnv wouldn't include websocket-driver unless the
test group was included, even though it's required by the default group.

This is arguably a bug in Bundix (websocket-driver's groups should
probably be [ "default" "test" ] or just [ "default" ]), but there's no
reason bundlerEnv should omit dependencies even given such an input --
it won't necessarily come from Bundix, and it would be good for
bundlerEnv to do the right thing.

To fix this, filterGemset is now a recursive function, that adds
dependencies of gems in the group to the filtered gemset until it
stabilises on the gems that match the required groups, and all of their
recursive dependencies.
2018-12-11 21:26:07 +00:00
Matthew Bauer
3b32c920d5 systems/parse.nix: support eabihf
eabihf is an abi that can be used with ARM architectures that support
the “hard float”. It should probably only be used with ARM32 when you
are absolutely sure your binaries will run on ARM systems with a FPU.

Also, add an example "armhf-embedded" to match the preexisting
arm-embedded system. qmk_firmware needs hard float in a few places, so
add them here to get that to work.

Fixes #51184
2018-12-02 19:49:36 -06:00
Frederik Rietdijk
1828a5c5ba Merge master into staging-next 2018-11-30 17:46:21 +01:00
Matthew Bauer
f435272ce3
Merge pull request #50212 from matthewbauer/host-emulator
Add "emulator" function to systems
2018-11-29 19:34:20 -06:00
Matthew Bauer
9c8fd41224 treewide: add emulator to platform
You can use stdenv.hostPlatform.emulator to get an executable that
runs cross-built binaries. This could be any emulator. For instance,
we use QEMU to emulate Linux targets and Wine to emulate Windows
targets. To work with qemu, we need to support custom targets.

I’ve reworked the cross tests in pkgs/test/cross to use this
functionality.

Also, I’ve used talloc to cross-execute with the emulator. There
appears to be a cross-execute for all waf builds. In the future, it
would be nice to set this for all waf builds.

Adds stdenv.hostPlatform.qemuArch attrbute to get the qemuArch for
each platform.
2018-11-29 19:15:30 -06:00
Matthew Bauer
ce6d558c4d systems/examples.nix: move riscv function to let binding
Makes it easier to use mapAttrs with lib.systems.examples. Now every
entry in it are legitimate systems.
2018-11-29 19:15:28 -06:00
Jan Malakhovski
1b3629ef34 lib: implement setPrio
For when `hiPrio` and `lowPrio` are not enough.
2018-11-22 08:59:48 +00:00
Frederik Rietdijk
c31cb577ae Merge master into staging-next 2018-11-22 09:57:08 +01:00
Robert Hensing
9959d7d8b8
Merge pull request #50532 from typetetris/add-extends-example
lib/fixed-points.nix: add an example for extends
2018-11-21 18:27:09 +01:00
Eric Wolf
3cc83dffca lib/fixed-points.nix: add an example for extends
- helped me understand how extends works, hopefully it can help others too
2018-11-21 17:40:20 +01:00
Matthew Bauer
4b00cfe77f systems/parse: add older x86 architectures
i386, i486, i586 are added. These may have issues as many places
assume i686 is the only valid 32 bit x86 architecture.
2018-11-21 09:38:10 -06:00
Frederik Rietdijk
0d0d7dcd06 Merge staging-next into staging 2018-11-18 10:41:34 +01:00
Linus Heckemann
4ef0760808 lib/licenses: remove bsl10
Licence isn't used anywhere and nonfree.
2018-11-16 20:58:49 +01:00
Linus Heckemann
8fb1e5e166 lib/licenses: mark some as unfree
AMD license agreement (currently unavailable at the given URL, but
included in tarball) disallows reverse-engineering, modification,
redistribution etc;

BSL licenses limit commercial production use.
2018-11-16 20:58:33 +01:00
zimbatm
2a838cb6d7
group the release info
this makes the codename globally accessible in the repo. The release is
not only for NixOS anymore.
2018-11-15 21:56:17 +01:00
Matthew Bauer
d97e0ba8fe
Merge pull request #49588 from vincrusher/master
lib/system: More Types of CPUs Added
2018-11-12 12:53:54 -06:00
Frederik Rietdijk
1d3bff25db Merge staging-next into staging 2018-11-11 14:28:08 +01:00
Silvan Mosberger
e468a1091b
Merge pull request #48687 from danielrutz/port-type
Add port type
2018-11-10 15:12:07 +01:00
Vincent Weisner
e7d2ea13e1
lib/systems: Added missing semicolons 2018-11-09 09:08:28 -05:00
Vincent Weisner
84810a1ba0
lib/system: Added Embedded Platforms for the CPUs
I added some embedded platforms for the CPUs I added to the parse.nix file.
These could be used as new platforms for the added CPUs.
2018-11-09 09:06:31 -05:00
Markus Kowalewski
e9da929e41
cwebbin: add license 2018-11-08 20:29:09 +01:00
Jan Malakhovski
2f5e4c733b lib: commitIdFromGitRepo: simplify a tiny bit 2018-11-08 05:20:18 +00:00
Patrick Hilhorst
320c9c10de
make-derivation: use pname-version as default name if both are present 2018-11-06 00:04:21 +01:00
Vincent Weisner
0607adde1a
Update parse.nix 2018-11-02 09:38:47 -04:00
Markus Kowalewski
b13ab27360
jasper: add license 2018-11-01 23:27:14 +01:00
Jörg Thalheim
aa75ebdcd3
CPU Fix
Co-Authored-By: vincrusher <vincentweisner@icloud.com>
2018-11-01 11:14:18 -04:00
Vincent Weisner
f9aaf7134b
Update parse.nix 2018-11-01 10:00:55 -04:00
John Ericson
4c48da246f
Merge pull request #49567 from obsidiansystems/arm-auto-detect
lib.systems.platforms: Add more ARM autodetection
2018-10-31 21:21:14 -04:00
John Ericson
aa964c82d3 lib.systems.platforms: Add more ARM autodetection 2018-10-31 19:04:06 -04:00
Matthew Bauer
2634d37617 systems/examples: add i686 & x86-64 embedded
Fixes #28160
2018-10-30 13:46:01 -05:00
Matthew Bauer
52dbd3380e systems/parse.nix: support weird system configs
There are some weird ones out there that don’t follow any pattern:

- arm-none-eabi
- powerpc-none-eabi
- aarch64-none-elf
2018-10-29 14:34:10 -05:00
Matthew Bauer
412093994b gcc: support avr
- respect libc’s incdir and libdir
- make non-unix systems single threaded
- set LIMITS_H_TEST to false for avr
- misc updates to support new libc’s
- use multilib with avr

For threads we want to use:
- posix on unix systems
- win32 on windows
- single on everything else

For avr:
- add library directories for avrlibc
- to disable relro and bind
- avr5 should have precedence over avr3 - otherwise gcc uses the wrong one
2018-10-29 14:34:09 -05:00
Matthew Bauer
72e3b2a662 systems: add avrlibc for avr systems 2018-10-29 14:34:09 -05:00
Matthew Bauer
d59a9ac7cf avr: use new compilation infrastructure
Gets rid of:
  avrbinutils
  avrgcc

to replace with:
  pkgsCross.avr.buildPackages.binutils
  pkgsCross.avr.buildPackages.gcc
2018-10-29 14:34:09 -05:00
Graham Christensen
0c5d9e5c52
Merge pull request #49383 from tazjin/docs/lib-docstrings
Update library function "docstrings" for nixdoc generation
2018-10-29 11:00:02 +00:00
Vincent Ambo
2384966880 lib/options: Update documentation comments for docs generation
Documents functions in `lib.options` for docs generation with nixdoc.

The formatting change in the `mkOption` arguments is due to the way
`nixdoc` parses documentation comments on pattern arguments. It's not
ideal, but it works.
2018-10-29 10:45:28 +01:00
Vincent Ambo
da18b92635 lib/debug: Update documentation comments for docs generation
Documents functions in `lib.debug` for docs generation with nixdoc.

Note that type signatures and clearer descriptions are still missing
on some of these functions, but this is good enough for a first run.
2018-10-29 10:45:25 +01:00
Vincent Ambo
65f50a9bb0 lib/lists: Update documentation comments for doc generation
Updates documentation comments with extra information for nixdoc[1]
compatibility.

[1]: https://github.com/tazjin/nixdoc
2018-10-29 10:42:43 +01:00
Vincent Ambo
0560caa578 lib/strings: Update documentation comments for doc generation
Updates documentation comments with extra information for nixdoc[1]
compatibility.

Some documentation strings have additionally been reworded for
clarity.

"Faux types" are added where applicable, but some functions do things
that are not trivially representable in the type notation used so they
were ignored for this purpose.

[1]: https://github.com/tazjin/nixdoc
2018-10-29 10:42:43 +01:00
taku0
66124646ee licenses: add GPLv2.0 only + classpath exception 2018-10-28 13:52:12 +00:00
Vincent Ambo
c2a744b9af lib/trivial: Update function comments for doc generation
Expands on some of the function comments and add some of the
special syntaxes recognised by nixdoc.
2018-10-27 16:40:40 +02:00
Tim Cuthbertson
d984c55383 lib.isStorePath: fix false result when passed a path object
Since `isStorePath` relies on comparing against builtins.storeDir
(a string), we need to convert the input into a string as well.
2018-10-20 22:33:04 +11:00
xeji
856243e346
Merge pull request #48680 from markuskowa/licenses-22
Add licenses
2018-10-18 23:40:02 +02:00
Daniel Rutz
161c0765ad Add type port as an alias to u16 2018-10-18 23:39:13 +02:00
Markus Kowalewski
f5b9a9455f
libmilter: add license 2018-10-18 22:36:18 +02:00
John Ericson
d97e5e1115
Merge pull request #48602 from matthewbauer/cmake-cross
Set CMAKE_SYSTEM_* for cross compiling
2018-10-18 15:47:04 -04:00
Matthew Bauer
4a12a9321c tests/systems.nix: fix tests
these weren’t being run correctly
2018-10-18 14:12:49 -05:00
Matthew Bauer
c8040003f0 Correctly set windows doubles
mingw is the toolchain name but it is actually run on a window kernel
2018-10-17 17:03:00 -05:00
Matthew Bauer
45cc6e2a42 lib/systems: use lookup for uname.system
This is a little bit cleaner and avoids the if ... else if ... chain.
2018-10-17 14:43:49 -05:00
Matthew Bauer
8652631b13 systems/doubles.nix: add mingw doubles
this makes it easier to show what supports windows vs. unix.
2018-10-16 21:56:58 -05:00
Matthew Bauer
0e0894c37d lib/systems: add uname attrs 2018-10-16 21:48:43 -05:00
Eelco Dolstra
b6bac6c144
Revert "Merge pull request #48122 from zimbatm/pkg-nixos-rebuild"
This reverts commit 10addad603, reversing
changes made to 7786575c6c.

NixOS scripts should be kept in the NixOS source tree, not in
pkgs. Moving them around is just confusing and creates unnecessary
code/history churn.
2018-10-16 20:25:44 +02:00
zimbatm
b7a07313cc
move the codeName to /.codeName
Make the codeName globally accessible in the repo. The release is not
only for NixOS anymore.
2018-10-16 11:11:28 +02:00
Matthew Bauer
0b298d516a
Merge pull request #47182 from bhipple/add/mkl
mkl: init at 2019.0.117
2018-10-15 15:17:57 -05:00
Léo Gaspard
455e0ed885 generators: make toPretty handle floats correctly 2018-10-15 14:03:16 +02:00
Moritz Kiefer
6738033727
alt-ergo: 1.30->2.2.0, ocplib-simplex: 0.3->0.4 2018-10-13 17:45:45 +00:00
Ryan Mulligan
1bde5ec7e0
Merge pull request #48251 from samueldr/feature/separated-string-description
lib/types: enhances separatedString's description.
2018-10-12 16:41:21 -07:00
Samuel Dionne-Riel
0808c7cd31 lib/types: enhances separatedString's description
The previous description "string" is misleading in the full options
manual pages; they are actually concatenated strings, with a specific
character.

The empty string version ("types.string") has been special-cased to
provide a better message.
2018-10-12 19:11:16 -04:00
Bas van Dijk
fceab3ec62 lib: fix wording of the overrideScope warning 2018-10-11 17:23:47 +02:00
John Ericson
dd428b8f5f
Merge pull request #47980 from lopsided98/armv7l-system-config
lib/systems: use correct config for armv7l-hf-multiplatform
2018-10-09 20:59:50 -04:00
Ben Wolsieffer
50e947f529 lib/systems: use correct config for armv7l-hf-multiplatform 2018-10-06 01:01:07 -04:00
Graham Christensen
4312cfdbda
version.nix: extract revision-fetching function 2018-10-05 11:06:28 -04:00
Graham Christensen
62b3e55923
Merge pull request #47683 from NixOS/docs-lib-options
docs: lib/options.nix function documentation
2018-10-02 17:34:07 -04:00
Tobias Pflug
d5166027e2 docs: lib/options.nix function documentation 2018-10-02 22:05:57 +02:00
Tobias Pflug
1d68b5ee84 docs: documentation for cleanSource 2018-10-02 22:05:06 +02:00
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
Benjamin Hipple
d7c1d04af4 mkl: init at 2019.0.117
This packags the Intel Math Kernel library on x86-64 platforms, which is a
dependency for many data science and machine learning packages.

Upstream, Intel provides proprietary binary RPMs with a permissive
redistribution license. These have been repackaged in both Debian and Anaconda,
so we are not the first distribution to redistribute.
2018-09-22 15:28:39 -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