summary refs log tree commit diff
path: root/lib/systems
Commit message (Collapse)AuthorAge
* lib, stdenv: Check `meta.platforms` against host platform and be open worldJohn Ericson2018-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | First, we need check against the host platform, not the build platform. That's simple enough. Second, we move away from exahustive finite case analysis (i.e. exhaustively listing all platforms the package builds on). That only work in a closed-world setting, where we know all platforms we might build one. But with cross compilation, we may be building for arbitrary platforms, So we need fancier filters. This is the closed world to open world change. The solution is instead of having a list of systems (strings in the form "foo-bar"), we have a list of of systems or "patterns", i.e. attributes that partially match the output of the parsers in `lib.systems.parse`. The "check meta" logic treats the systems strings as an exact whitelist just as before, but treats the patterns as a fuzzy whitelist, intersecting the actual `hostPlatform` with the pattern and then checking for equality. (This is done using `matchAttrs`). The default convenience lists for `meta.platforms` are now changed to be lists of patterns (usually a single pattern) in `lib/systems/for-meta.nix` for maximum flexibility under this new system. Fixes #30902
* treewide: get rid of platforms.allButJohn Ericson2018-03-14
| | | | | | | Negative reasoning like `allBut` is a bad idea with an open world of platforms. Concretely, if we add a new, quite different sort of platform, existing packages with `allBut` will claim they work on it even though they probably won't.
* prebuilt android tools: Init using SDKJohn Ericson2018-02-27
| | | | Expose as an option for the cross stdenv.
* Merge pull request #35247 from telent/mips32John Ericson2018-02-27
|\ | | | | lib, treewide: Add missing MIPS arches, and fix existing usage
| * lib, treewide: Add missing MIPS arches, and fix existing usageDaniel Barlow2018-02-23
| | | | | | | | | | | | | | | | | | Existing "mips64el" should be "mipsel". This is just the barest minimum so that nixpkgs can recognize them as systems - although required for building individual derivations onto MIPS boards, it is not sufficient if you want to actually build nixos on those targets
* | Only build libseccomp on supported systemsShea Levy2018-02-24
| |
* | gnu-efi: Fix aarch64 cross-buildShea Levy2018-02-24
| |
* | gnu-efi: Only build on efi-enabled systemsShea Levy2018-02-24
| |
* | kexectools: Only build on kexecable architectures.Shea Levy2018-02-24
|/
* riscv: Compile console support into the kernel.Shea Levy2018-02-19
|
* linux_riscv: Add 4.16-rc1.Shea Levy2018-02-19
| | | | Fixes #35148.
* Add riscv{32,64} crossSystems.Shea Levy2018-02-18
|
* treewide: Drop kernelHeadersBaseConfigTuomas Tynkkynen2018-02-14
| | | | Nothing actually needs this.
* Drop "isGlibc", but keep isMusl.Will Dietz2018-02-11
| | | | gnu "abi" doesn't mean glibc (mingw, apparently).
* lib/systems: musl, libc predicatesWill Dietz2018-02-11
| | | | | | Note this doesn't actually provide musl support yet, just improves our "system" code to understand musl-based triples and non-glibc linux configurations.
* platforms.nix: Include RPi 3 serial port in the kernel configTuomas Tynkkynen2018-02-06
|
* lib: Avoid double importJohn Ericson2018-01-31
|
* lib: Better use the module type system in platform parsingJohn Ericson2018-01-30
| | | | | | | | | I need some module system types here so I can next fix meta-checks for derivations. I'd like to use a "proper" record type here, but submodule types seem overkill so holding off with ad-hoc stuff for now. In practice, all I need for the next step are the `.check` functions so this is good, especially as the submodule check function is shallow, saving full inductive type-checking for a later step.
* lib, openssl: Get rid of openssl.systemJohn Ericson2018-01-26
| | | | We compute it on the fly, careful to avoid any mass rebuilds for now.
* lib: Remove examples platforms' `bigEndian` attrJohn Ericson2018-01-26
| | | | They still have `parsed.cpu.significantByte` which has the same info.
* lib, glibc: Get rid of withTLSJohn Ericson2018-01-26
| | | | | | | | | | | | glibc removed the underlying flag in 2011 in 83cd14204559abbb52635006832eaf4d2f42514a [1]. This gets us one step closer to fixing #34274: the cross stdenv for aarch64-unknown-linux-gnu at least evals now. Thanks to @Dezgeg for doing all the research for this. [1]: https://sourceware.org/git/?p=glibc.git;a=commit;h=83cd14204559abbb52635006832eaf4d2f42514a
* lib: Allow parsing platform configs with arch of `{riscv,wasm}{32,64}`John Ericson2018-01-26
| | | | Also add `isRiscv` and `isWasm` predicates.
* Merge commit 'ab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a' into gcc-simplify-flagsJohn Ericson2017-12-05
|\
| * kernel: add beagleboard.org kernelDrew Hess2017-11-09
| | | | | | And update the existing platform variant to use it
| * platforms.nix: Clean up more 'uboot' legacyTuomas Tynkkynen2017-11-05
| | | | | | | | | | | | For a while now, the only thing the 'uboot' attribute does is to tell whether to add ubootTools to kernel/initrd builds. That can be determined with platform.kernelTarget == "uImage" just as well.
| * kernel: Build Tegra PCI support.Drew Hess2017-10-18
| |
| * Merge pull request #27797 from grahamc/fixed-libJohn Ericson2017-09-19
| |\ | | | | | | Convert libs to a fixed-point
| | * Convert libs to a fixed-pointGraham Christensen2017-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does break the API of being able to import any lib file and get its libs, however I'm not sure people did this. I made this while exploring being able to swap out docFn with a stub in #2305, to avoid functor performance problems. I don't know if that is going to move forward (or if it is a problem or not,) but after doing all this work figured I'd put it up anyway :) Two notable advantages to this approach: 1. when a lib inherits another lib's functions, it doesn't automatically get put in to the scope of lib 2. when a lib implements a new obscure functions, it doesn't automatically get put in to the scope of lib Using the test script (later in this commit) I got the following diff on the API: + diff master fixed-lib 11764a11765,11766 > .types.defaultFunctor > .types.defaultTypeMerge 11774a11777,11778 > .types.isOptionType > .types.isType 11781a11786 > .types.mkOptionType 11788a11794 > .types.setType 11795a11802 > .types.types This means that this commit _adds_ to the API, however I can't find a way to fix these last remaining discrepancies. At least none are _removed_. Test script (run with nix-repl in the PATH): #!/bin/sh set -eux repl() { suff=${1:-} echo "(import ./lib)$suff" \ | nix-repl 2>&1 } attrs_to_check() { repl "${1:-}" \ | tr ';' $'\n' \ | grep "\.\.\." \ | cut -d' ' -f2 \ | sed -e "s/^/${1:-}./" \ | sort } summ() { repl "${1:-}" \ | tr ' ' $'\n' \ | sort \ | uniq } deep_summ() { suff="${1:-}" depth="${2:-4}" depth=$((depth - 1)) summ "$suff" for attr in $(attrs_to_check "$suff" | grep -v "types.types"); do if [ $depth -eq 0 ]; then summ "$attr" | sed -e "s/^/$attr./" else deep_summ "$attr" "$depth" | sed -e "s/^/$attr./" fi done } ( cd nixpkgs #git add . #git commit -m "Auto-commit, sorry" || true git checkout fixed-lib deep_summ > ../fixed-lib git checkout master deep_summ > ../master ) if diff master fixed-lib; then echo "SHALLOW MATCH!" fi ( cd nixpkgs git checkout fixed-lib repl .types )
| * | lib: Add `*Platform.extensions`John Ericson2017-09-13
| |/ | | | | | | | | This is used to platform specific library and exectuable extensions. In the next commit I'll replace a bunch of ad-hoc logic with it.
| * Fix "treewide: Consistently call ARM 'arm'"Tuomas Tynkkynen2017-08-24
| | | | | | | | | | | | 0c0fad6141cf3d62 was broken. I didn't realize there's some hidden metaprogramming code where one can't even grep for 'isFoo' to find its definition :(
| * treewide: Consistently call ARM 'arm'Tuomas Tynkkynen2017-08-24
| | | | | | | | No need for silly differences.
* | Merge commit '71186e73455a4e06e96a31da34b76f84e545ba1f' into gcc-simplify-flagsJohn Ericson2017-12-05
|\|
| * kernel: Build Tegra X1 USB support as a moduleTuomas Tynkkynen2017-07-28
| |
| * lib: Add isPowerPC predicate, and fix family nameJohn Ericson2017-07-10
| |
| * lib: Include darwin in isUnixDavid McFarland2017-07-03
| |
| * stdenv: remove unix kernel familyDavid McFarland2017-06-26
| | | | | | | | | | System predicate patterns can now be specified as a list of OR'd attribute sets.
| * cygwin: fix doubleFromSystem for cygwinDavid McFarland2017-06-26
| |
* | lib: Unbreak pogoplug example platformJohn Ericson2017-12-05
| | | | | | | | Vendor needed to be made valid
* | lib, gcc: No `inherit (platform) gcc;` in {host,build,target}PlatformJohn Ericson2017-12-05
|/
* lib and doc: Use "libSystem" as identifier for that libc in platformsJohn Ericson2017-05-31
|
* cross tests and stdenv: armv5te*l* of sheevaplug explicitJohn Ericson2017-05-29
| | | | | The "l" suffix presumably indicates it is little-endian, which it is.
* lib: Consolidate platform configurations (used for crossSystem)John Ericson2017-05-29
| | | | This is good for maintenance and education.
* zpaqd: Modernize derivationJohn Ericson2017-05-22
| | | | | - Simplified platform-specific options - Almost ready for cross-compilation
* stdenv: Rename `isGNU` to `isHurd` as GNU is a userlandJohn Ericson2017-05-22
| | | | | Elsewhere, things called GNU indeed includes GNU/Linux or GNU/Hurd, but this predicate was defined excluding Linux regardless of userland.
* lib: Infer `libc` field of platform if not specifiedJohn Ericson2017-05-22
| | | | | | | | This is especially useful when not cross compiling. It means we can remove the `stdenv.isGlibc` predicate too. Additionally, use this to simplify the logic to choose the appropriate libiconv derivation.
* lib: Make platform predicates more ergonomic to useJohn Ericson2017-05-22
| | | | | `hostPlatform.isDarwin` instead of `lib.system.parse.isDarwin hostPlatform.parsed`
* lib platform parsing: Whitelist `darwin10` and `darwin14` as stopgapJohn Ericson2017-05-17
| | | | | Something better should be done longer term to support such version suffixes.
* lib platform parsing: Fix windows support to conform to LLVM, take 2John Ericson2017-05-17
| | | | | | | Second attempt at pull request #25275 This reverts commit b70924bd80918d153a5e2023afd7647ae7b24a12, reapplying 2282a5774cd80567644a44d31585bf965a55f9ec
* Revert "Merge pull request #25275 from Ericson2314/platform-normalize"Vladimír Čunát2017-05-06
| | | | | | | | This reverts commit 2282a5774cd80567644a44d31585bf965a55f9ec, reversing changes made to 14adea91566019549f33392d4710d9babd0108d7. The lib tests are bloking nixpkgs-unstable, and I don't like debugging it soon enough.
* Merge pull request #25035 from elitak/cross-stagingMichael Raskin2017-05-01
|\ | | | | Add some ARM platforms