Commit Graph

2664 Commits

Author SHA1 Message Date
Silvan Mosberger
b3e9073c48
Merge pull request #125991 from helsinki-systems/drop/mkStrict
lib/modules: Drop mkStrict and mkFixStrictness
2021-06-23 00:48:59 +02:00
Pavol Rusnak
68889ed61f
treewide: use quotes for url 2021-06-20 16:26:23 +02:00
tomberek
3a745b2c2c
Merge pull request #125942 from musfay/rlottie
rlottie: 0.1 -> 0.2
2021-06-07 01:08:30 -04:00
Janne Heß
8fb9984690
lib/modules: Drop mkStrict and mkFixStrictness
This was deprecated in 2014 and is not used anywhere in the tree.
2021-06-06 20:53:05 +02:00
Alyssa Ross
4d6a0bb966 lib.systems.parsed: add "elf" for some NetBSD archs
In Autoconf, some old NetBSD targets like "i686-unknown-netbsd" are
interpreted as a.out, not elf, and virtually nothing supports it.  We
need to specify e.g. "i686-unknown-netbsdelf" to get the right
behaviour.
2021-06-06 18:52:58 +00:00
Alyssa Ross
5a8372d04e lib.systems.parse.kernels: fix typo in comment 2021-06-06 18:52:58 +00:00
Mustafa Çalışkan
642dce498a
rlottie: 0.1 -> 0.2 2021-06-06 14:15:36 +03:00
Sandro
870dce75e3
Merge pull request #82642 from magnetophon/faustPhysicalModeling 2021-06-06 01:39:04 +02:00
Michael Weiss
ed8115ef5b
Merge pull request #124992 from primeos/android-tools
android-tools: init at 31.0.0p1
2021-06-02 21:06:00 +02:00
Michael Weiss
c57b309d32
android-tools: init at 31.0.0p1
lowPrio is used to avoid collisions with the simg2img package.
Licensing information is in share/licenses/android-tools/AOSP_LICENSE.
2021-06-02 12:08:01 +02:00
Zhaofeng Li
e2aee93caf platforms: Enable ftrace support for RISC-V
Support has landed in mainline for a while.
2021-06-01 19:49:30 -07:00
Zhaofeng Li
805e9ce9ea platforms: Build flat kernel image for RISC-V
Newer bootloaders for RISC-V (i.e., OpenSBI + U-Boot) support
flat and compressed kernel images but not vmlinux. Therefore,
let's build "Image" like what we do with aarch64.

Also copy DTBs while we are at it.
2021-06-01 19:49:30 -07:00
Anderson Torres
41d76a33eb
Merge pull request #119967 from xoe-labs/da/add-lib-flake
init: lib/flake
2021-05-24 02:06:19 -03:00
Jonathan Ringer
11a9ac00fc
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
 pkgs/tools/networking/xh/default.nix
2021-05-22 18:19:10 -07:00
Jonathan Ringer
ff1ded3e20 21.11 is Porcupine! 2021-05-22 18:14:06 -07:00
Andrew Childs
755d980440 darwin: use "11.0" as sdk and minimum version on aarch64-darwin 2021-05-17 00:27:03 +09:00
Andrew Childs
23cae56ca7 lib/systems/platforms: add Apple M1 2021-05-17 00:27:03 +09:00
Moritz Angermann
3a3df3146e Add crossPkgs.aarch64-darwin 2021-05-17 00:27:02 +09:00
Matthew Bauer
a6753d0c42 lib/systems: add aarch64-darwin to mesaPlatforms 2021-05-17 00:27:02 +09:00
github-actions[bot]
78ae7ac75e
Merge staging-next into staging 2021-05-15 06:22:25 +00:00
John Ericson
18c38f8aee treewide: All the linker to be chosen independently
This will begin the process of breaking up the `useLLVM` monolith. That
is good in general, but I hope will be good for NetBSD and Darwin in
particular.

Co-authored-by: sterni <sternenseemann@systemli.org>
2021-05-14 21:29:51 +00:00
Ben Siraphob
f986333023 lib/systems/parse: make isCompatible description clearer and more useful
Stating that CPUs and the isCompatible relation forms a category (or
preorder) is correct but overtly technical.  We can state it more
clearly for readers unfamiliar with mathematics while retaining some
keywords to be useful to technical readers.
2021-05-14 13:23:28 -07:00
s1341
1e1d29c2af treewide: Support aarch64-android using minimal prebuilt components
This PR adds a new aarch64 android toolchain, which leverages the
existing crossSystem infrastructure and LLVM builders to generate a
working toolchain with minimal prebuilt components.

The only thing that is prebuilt is the bionic libc. This is because it
is practically impossible to compile bionic outside of an AOSP tree. I
tried and failed, braver souls may prevail. For now I just grab the
relevant binaries from https://android.googlesource.com/.

I also grab the msm kernel sources from there to generate headers. I've
included a minor patch to the existing kernel-headers derivation in
order to expose an internal function.

Everything else, from binutils up, is using stock code. Many thanks to
@Ericson2314 for his help on this, and for building such a powerful
system in the first place!

One motivation for this is to be able to build a toolchain which will
work on an aarch64 linux machine. To my knowledge, there is no existing
toolchain for an aarch64-linux builder and an aarch64-android target.
2021-05-11 15:39:08 +00:00
Erlend Pedersen
3452a739d1
nixpkgs-manual: lib.attrsets.mapAttrsToList returns a list (#122179) 2021-05-08 13:55:11 +02:00
Silvan Mosberger
fb1969806f
Merge pull request #117888 from kvtb/patch-3
types.nix: fix outdated comment
2021-05-08 05:46:10 +02:00
Silvan Mosberger
08d94fd2b0
Merge pull request #114374 from oxalica/lib/platform-support-check
lib.meta: introduce `availableOn` to check package availability on given platform
2021-05-08 03:54:36 +02:00
Silvan Mosberger
527861959b
Merge pull request #119406 from sternenseemann/toDerivation-list
lib/attrsets: make toDerivation x always work when isStorePath x
2021-05-07 02:09:05 +02:00
Robert Hensing
0633b6aa74
Merge pull request #121870 from Pacman99/pass-specialargs
lib/modules: pass specialArgs to modules
2021-05-07 01:54:48 +02:00
sternenseemann
f39a5c4e50 lib/strings: forbid lists in isStorePath
When a list is passed to isStorePath this is most likely a mistake and
it is therefore better to just return false. There is one case where
this theoretically makes sense (if a list contains a single element for
which isStorePath elem), but since that case is also probably seldomly
intentional, it may save someone from debbuging unclear evaluation
errors.
2021-05-07 01:22:30 +02:00
sternenseemann
326d0970e0 lib/strings: fix example for isStorePath
Since it checks if dirOf x is the nix store dir, a trailing slash will
break this check and make it return false.
2021-05-07 01:22:30 +02:00
Pacman99
c949e60220 lib/modules: pass specialArgs as a module argument 2021-05-06 16:04:08 -07:00
John Ericson
470640e7fe treewide: Do a number of no-op cleanups for cross and darwin
I am taking the non-invasive parts of #110914 to hopefully help out with #111988.

In particular:

 - Use `lib.makeScopeWithSplicing` to make the `darwin` package set have
   a proper `callPackage`.

 - Adjust Darwin `stdenv`'s overlays keeping things from the previous
   stage to not stick around too much.

 - Expose `binutilsNoLibc` / `darwin.binutilsNoLibc` to hopefully get us
   closer to a unified LLVM and GCC bootstrap.
2021-05-06 11:17:26 -04:00
Silvan Mosberger
98c77a0b2d lib/modules: Small optimization 2021-05-06 04:59:27 +02:00
Silvan Mosberger
f445acbe0a
Merge pull request #114955 from berbiche/fix/modules-imports-list
lib/modules: provide a better error message when "imports" contains a list
2021-05-05 23:20:39 +02:00
Nicolas Berbiche
810c9c6a0e
lib/modules: provide error message when imports contains a list 2021-05-05 14:15:04 -04:00
Robert Hensing
a36e6760e9 Revert "lib/modules: Issue type deprecation warnings recursively"
This reverts commit 4b54aedee5.
2021-05-05 18:53:34 +02:00
Robert Hensing
e7412dde1f Revert "lib/tests: Add type deprecation tests"
This reverts commit 8b957e3b30.
2021-05-05 18:53:28 +02:00
Silvan Mosberger
8b957e3b30 lib/tests: Add type deprecation tests 2021-05-03 22:16:06 +02:00
Silvan Mosberger
4b54aedee5 lib/modules: Issue type deprecation warnings recursively
Previously, an option of type

  attrsOf string

wouldn't throw a deprecation warning, even though the string type is
deprecated. This was because the deprecation warning trigger only looked
at the type of the option itself, not any of its subtypes.

This commit fixes this, causing each of the types deprecationMessages to
trigger for the option. This relies on the subtypes mkOptionType
attribute introduced in 26607a5a2e06653fec453c83d063cdfc4b59185f
2021-05-03 22:16:02 +02:00
Silvan Mosberger
ce5e3113c3 lib/tests: Make sure the submodule type description can be evaluated
In 2d45a62899, the submodule type
description was amended with the freeformType description. This causes
all the modules passed to the submodule to be evaluated once on their
own, without any extra definitions from the config section. This means
that the specified modules need to be valid on their own, without any
undeclared options.

This commit adds a test that evaluates a submodules option description,
which would trigger the above problem for one of the tests, if it were
not fixed by this commit as well.

This is done because the next commit makes option evaluation a bit more
strict, which would also trigger this test failure, even though it's not
related to the change at all.
2021-05-03 22:15:33 +02:00
Silvan Mosberger
68955fe612 lib/types: Introduce mkOptionType occurringTypes argument
This will be used to issue deprecation warnings recursively in the next
commit

In addition, this allows easily getting nested types of other options, which
is useful when you want to create an option that aliases a part of
another one.
2021-05-03 22:15:30 +02:00
Silvan Mosberger
680a901ae1
Merge pull request #120774 from sternenseemann/shellpackage-fix-check
lib/types: only accept derivations for shellPackage
2021-05-03 16:42:08 +02:00
Lennart Spitzner
8c70a1a989
lib: fix documented type of fixedWidthString (#121396) 2021-05-01 17:29:00 +02:00
Alyssa Ross
a8afbb45c1 treewide: use lib.warnIf where appropriate 2021-04-28 21:44:21 +00:00
Alyssa Ross
81e1e68eaf lib.trivial.warnIf: init
It's a common pattern in Nixpkgs to want to emit a warning in certain
cases, but not actually change behaviours.

This is often expressed as either
	if cond then lib.warn "Don't do that thing" x else x
Or
	(if cond then lib.warn "Don't do that thing" else lib.id) x

Neither of which really expresses the intent here, because it looks
like 'x' is being chosen conditionally.

To make this clearer, I introduce a "warnIf" function, which makes it
clear that the only thing being affected by the condition is whether
the warning is generated, not the value being returned.
2021-04-28 21:44:21 +00:00
David Arnold
2cd41fb432
init: lib/flake
A subflake that can be indidividually accessed without also providing
an interface to the whole of nixpkgs.

Usage:
inputs.nixpkgs-lib.url = "github:NixOS/nixpkgs?dir=lib"
2021-04-28 14:21:27 -05:00
sternenseemann
8a83d611f5 lib/types: only accept derivations for shellPackage
Since shellPackage actually requires the value to be an attribute set
(i. e. an derivation in this case), we cannot re-use the package.check
type checker since it also allows strings or things that are coercible
to strings as long as they look like store paths.
2021-04-26 20:43:43 +02:00
Jan Tojnar
0f1c4558d3
Merge branch 'master' into staging-next
Choose binwalk 2.3.1, 27 is legacy version for Python 2.
2021-04-25 02:50:48 +02:00
github-actions[bot]
6e7c70d02d
Merge master into staging-next 2021-04-24 00:16:17 +00:00
Alyssa Ross
532493b508
lib.systems.doubles.netbsd: expand
These are all the architectures supported by Nixpkgs on other
platforms, that are also supported by NetBSD.  (So I haven't added
any architectures that are new to Nixpkgs here, even though NetBSD
supports some that we don't have.)
2021-04-23 22:23:25 +00:00