1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00
Commit graph

2085 commits

Author SHA1 Message Date
danbst 27982b408e types.optionSet: deprecate and remove last usages 2019-01-31 00:41:10 +02:00
danbst aa2e63ce5e lib/modules.nix: small eval optimization (foldl' + foldl' + attrNames -> foldl' + mapAttrs) 2019-01-30 15:26:44 +02:00
danbst f32987d451 lib/types.nix: small eval optimization (listToAttrs + mapAttrsToList -> mapAttrs) 2019-01-30 15:26:44 +02:00
Matthieu Coudron 7aacbdb898 linux: convert hardened-config to a structured one 2019-01-28 09:07:24 +09:00
Matthieu Coudron 3bb7b3f02e linux: ability to merge structured configs
This should make the composability of kernel configurations more straigthforward.

- now distinguish freeform options from tristate ones
- will look for a structured config in kernelPatches too
one can now access the structuredConfig from a kernel via linux_test.configfile.structuredConfig
in order to reinject it into another kernel, no need to rewrite the config from scratch

The following merge strategies are used in case of conflict:
-- freeform items must be equal or they conflict (mergeEqualOption)
-- for tristate (y/m/n) entries, I use the mergeAnswer strategy which takes the best available value, "best" being defined by the user (by default "y" > "m" > "n", e.g. if one entry is both marked "y" and "n", "y" wins)
-- if one item is both marked optional/mandatory, mandatory wins (mergeFalseByDefault)
2019-01-28 09:06:33 +09:00
Matthew Bauer bf041c3f1d
systems/default.nix: wasm in platform.uname.system
This adds the "Wasm" system to platform.uname.system. This is used in CMake infrastructure.
2019-01-27 17:29:23 -05:00
Michael Raskin 4d0e1b792f
Merge pull request #50561 from oxij/lib/setPrio
lib: implement `setPrio`
2019-01-18 08:23:31 +00:00
Nicolas B. Pierron a3beabf327
Merge pull request #53397 from cdepillabout/aliasoptionmodule-set-priority
lib/modules: Add function to create option alias that respects priority
2019-01-14 20:28:28 +01:00
Jörg Thalheim b75aff7202
Merge pull request #53754 from danbst/lib-fake-hashes
lib: add fake hashes
2019-01-10 17:56:09 +00:00
danbst 68a6b47b8c lib: add shortcuts for fake hashes (fakeSha256, fakeSha512)
Fake hashes can be used as placeholders for all the places, where
Nix expression requires a hash, but we don't yet have one.

This should be more convenient than following:
- echo|sha256sum, copy into clipboard, go to editor, paste into previously
  edited place
- search nixpkgs for a random package, copy it's hash to cliboard, go to
  editor, paste into previously edited place

Nix can add support for these fake hashes. In that case printed error should contain
only 1 hash, so no more problem "which of two hashes from error should I use?"

Idea by irc:Synthetica
2019-01-10 19:27:35 +02:00
(cdep)illabout 7314d885a1
Add test that shows that the aliases are able to override options. 2019-01-06 18:10:03 +09:00
(cdep)illabout f24e2d0721
Pull out defaultPriority to a top-level definition. 2019-01-06 17:48:37 +09:00
Vladimír Čunát d84a33d85b
Merge branch 'master' into staging-next
A few more rebuilds (~1k on x86_64-linux).
2019-01-05 15:02:04 +01:00
John Ericson 1383670a83
Merge pull request #53029 from Ericson2314/windows-ce-arm
lib: Fix Mingw on 32-bit ARM
2019-01-04 20:27:35 -05:00
John Ericson 3bf0e4efc7 lib: Fix Mingw on 32-bit ARM 2019-01-04 12:05:35 -05:00
(cdep)illabout b81b3ad1b0
lib/modules: Add a function to create an option alias that respects the priority
This commit adds a function `mkAliasOptionModuleWithPriority`.  This
function will make an alias to an existing option and copy over the
priority.

This functionality is needed for PRs like #53041.  In that case
`nixos-generate-config` added an option to `hardware-configuration.nix`
with `mkDefault`.  That option was then changed and an alias created for
the old name.

The end user should be able to set the non-alias option in their
`configuration.nix` and have everything work correctly.  Without this
function, the priority for the option won't be copied over correctly
and the end-user will get a message saying they have the same option
set to two different values.
2019-01-04 18:35:10 +09:00
(cdep)illabout da00ec4b45
Add a failing test for mkAliasOptionModule. 2019-01-04 18:34:09 +09:00
Frederik Rietdijk 070290bda7 Merge master into staging-next 2018-12-31 12:00:36 +01:00
Frederik Rietdijk c6e043d57c Remove composableDerivation, closes #18763 2018-12-30 12:33:45 +00:00
Jan Tojnar c45e9d0fac
Merge branch 'master' into staging 2018-12-25 17:03:57 +01:00
Orivej Desh 18a5e8c36b licenses: update SPDX IDs (#52711)
See the bottom of https://spdx.org/licenses/ for the list of deprecations.

The explicit URLs of agpl3Plus and gpl2Classpath were dropped because the
default SPDX URL is correct.

wxWindows ID had wrong capitalization.
2018-12-24 23:29:58 +00:00
Sander van der Burg 51428627eb Initial attempt to restore Android NDK cross building 2018-12-18 22:58:12 +01:00
volth fed7914539
Merge branch 'staging' into make-perl-pathd 2018-12-18 17:13:27 +00:00
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