summaryrefslogtreecommitdiff
path: root/lib (follow)
Commit message (Expand)AuthorAgeFilesLines
* lib/trivial: Update oldestSupportedReleaseJanne Heß2022-07-041-1/+1
* lib.systems.examples: canonicalize MIPS triples•••In Nixpkgs, we assume that the "config" field is a canonicalized GNU triple. I noticed that non-canonical values were being used here, because the pkgsCross.mips64el-linux-gnu triples did not contain the vendor field, but the pkgsCross.mips64el-linux-gnu.pkgsStatic did. Here, I've run all the MIPS triples in lib.systems.examples through config.sub to canonicalize them. I think this will avoid nasty surprises in future. Tested by building Nix and the bootstrap files for pkgsCross.mips64el-linux-gnu. Alyssa Ross2022-07-031-14/+12
* lib.licenses: add Aladdin Free Public Licensetoastal2022-07-021-0/+6
* lib/options: Add hint for debugging infinite recursion in docsRobert Hensing2022-06-271-0/+2
* lib/options: Add showOptionWithDefLocsRobert Hensing2022-06-212-1/+8
* Merge pull request #176146 from pennae/module-docs-markdown•••treewide: markdown option docsRobert Hensing2022-06-212-1/+17
|\
| * treewide: attempt at markdown option docspennae2022-06-122-1/+17
* | teams/maintainers list: show instructions for validating the contentsGraham Christensen2022-06-201-2/+2
* | maintainer teams: check them in lib testsGraham Christensen2022-06-202-0/+54
* | maintainer lib test: extract maintainer moduleGraham Christensen2022-06-202-31/+32
* | maintainers: remove longkeyid•••see https://dkg.fifthhorseman.net/blog/openpgp-key-ids-are-not-useful.html Graham Christensen2022-06-201-1/+0
* | lib/modules: Throw earlier when module function does not return attrs•••`m` must always be an attrset at this point. It is basically always evaluated. This will make it throw when any of the attrs is accessed, rather than just `config`. We assume that this will improve the error message in more scenarios. Robert Hensing2022-06-143-3/+23
* | lib.deferredModule: Make it properly singularRobert Hensing2022-06-142-2/+4
* | lib.types: Add deferredModuleWithRobert Hensing2022-06-142-3/+25
* | lib.types.deferredModule: Allow path-typed module referencesRobert Hensing2022-06-143-4/+5
* | lib.types.deferredModule: Improve reported locationRobert Hensing2022-06-142-2/+2
* | lib/test/modules.sh: Test deferredModule error location fileRobert Hensing2022-06-142-2/+11
* | lib.types: Add deferredModuleRobert Hensing2022-06-143-0/+65
* | lib/types, lib/modules: Remove unused extensionOffsetRobert Hensing2022-06-142-13/+1
* | lib/types: Use map instead of imap1 in submoduleWithRobert Hensing2022-06-141-1/+1
* | lib/types: Simplify submoduleWith shorthandOnlyDefinesConfig handling•••The module system already uses the parent module's _file as a fallback, so we don't need to inject the file in a weird way Silvan Mosberger2022-06-141-12/+3
* | lib/tests: Add submodule file propagation testSilvan Mosberger2022-06-142-0/+25
|/
* Merge pull request #157480 from MatthewCroughan/in-pure-eval-mode•••lib: add inPureEvalModeRobert Hensing2022-06-102-1/+8
|\
| * lib: add inPureEvalMode•••This makes a value that is true if builtins does not contain the currentSystem function, but false if it does. matthewcroughan2022-05-062-1/+8
* | lib/modules: Fix missing prefix in extendModules when unset in both eval- and...Robert Hensing2022-06-101-1/+1
* | Merge pull request #173621 from ncfavier/submodule-description•••lib/types: allow custom `submoduleWith` descriptionsRobert Hensing2022-06-101-6/+17
|\ \
| * | lib/types: allow custom `submoduleWith` descriptions•••Currently the only way to set the description for a submodule type is to use `freeformType`. This is not ideal as it requires setting a freeform type, and evaluates the submodule config unnecessarily. Instead, add a `description` argument to `submoduleWith`. Naïm Favier2022-05-191-6/+17
* | | Merge pull request #177061 from ckiee/bitXOr-typo•••lib/zip-int-bits: fix typo: bitXOR -> bitXorSilvan Mosberger2022-06-091-1/+1
|\ \ \
| * | | lib/zip-int-bits: fix typo: bitXOR -> bitXorckie2022-06-091-1/+1
* | | | lib.systems.amd64-netbsd: remove•••This has been deprecated for a long time, and it's doubtful it had any users to start with. And having an undisablable warning when enumarating platforms is not good. Alyssa Ross2022-06-081-2/+0
* | | | Merge master into haskell-updatesgithub-actions[bot]2022-06-011-1/+1
|\ \ \ \
| * | | | Fix typo in compareLists docstringmichaelmouf2022-05-301-1/+1
* | | | | Merge master into haskell-updatesgithub-actions[bot]2022-05-312-0/+20
|\| | | |
| * | | | lib.sourceTypes: simplify implementation•••Co-authored-by: Alexander Foremny <aforemny@posteo.de> Robert Scott2022-05-301-9/+3
| * | | | add mechanism for handling meta.sourceProvenance attributes•••heavily based on patterns used by licenses infrastructure, so may appear overengineered for its initial level of use Robert Scott2022-05-302-0/+26
* | | | | haskell.compiler: ghc922 -> ghc923•••https://www.haskell.org/ghc/download_ghc_9_2_3.html Since the tarball is generated by Hadrian, neither autoreconf nor ./boot is executed so ./configure and ghc.mk is missing. sternenseemann2022-05-281-1/+1
|/ / / /
* | | | Merge pull request #174917 from alyssais/scaleway-c1•••lib.systems: drop scaleway-c1sternenseemann2022-05-272-9/+0
|\ \ \ \
| * | | | lib.systems: drop scaleway-c1•••These servers apparently no longer exist, since September 2, 2021[1]. If somebody needs this for non-Scaleway machines, they should suggest its reintroduction with a different name. [1]: https://news.ycombinator.com/item?id=27192757 Alyssa Ross2022-05-272-9/+0
* | | | | lib/systems/inspect.nix: remove isPowerPC•••Very confusingly, the `isPowerPC` predicate in `lib/systems/inspect.nix` does *not* match `powerpc64le`! This is because `isPowerPC` is defined as isPowerPC = { cpu = cpuTypes.powerpc; }; Where `cpuTypes.powerpc` is: { bits = 32; significantByte = bigEndian; family = "power"; }; This means that the `isPowerPC` predicate actually only matches the subset of machines marketed under this name which happen to be 32-bit and running in big-endian mode which is equivalent to: with stdenv.hostPlatform; isPower && isBigEndian && is32bit This seems like a sharp edge that people could easily cut themselves on. In fact, that has already happened: in `linux/kernel/common-config.nix` there is a test which will always fail: (stdenv.hostPlatform.isPowerPC && stdenv.hostPlatform.is64bit) A more subtle case of the strict isPowerPC being used instead of the moreg general isPower accidentally are the GHC expressions: Update pkgs/development/compilers/ghc/8.10.7.nix Update pkgs/development/compilers/ghc/8.8.4.nix Update pkgs/development/compilers/ghc/9.2.2.nix Update pkgs/development/compilers/ghc/9.0.2.nix Update pkgs/development/compilers/ghc/head.nix Since the remaining legitimate use sites of isPowerPC are so few, remove the isPowerPC predicate completely. The alternative expression above is noted in the release notes as an alternative. Co-authored-by: sternenseemann <sternenseemann@systemli.org> Adam Joseph2022-05-251-1/+0
|/ / / /
* | | | Merge pull request #171014 from hercules-ci/nixpkgs-warn-undeclared-options•••pkgs/top-level/config.nix: Add warnUndeclaredOptionsRobert Hensing2022-05-251-1/+1
|\ \ \ \
| * | | | lib.foldAttrs: Clarify exampleRobert Hensing2022-05-101-1/+1
| | |_|/ | |/| |
* | | | stdenv: fix evaluation of platform emulatorNick Cao2022-05-241-1/+1
* | | | lib.systems: inform isCompatible users about removalsternenseemann2022-05-231-0/+1
* | | | lib.systems.elaborate: expose canExecute predicate over isCompatible•••canExecute is like isCompatible, but also checks that the Kernels are _equal_, i.e. that both platforms use the same syscall interface. This is crucial in order to actually be able to execute binaries for the other platform. isCompatible is dropped, since it has changed semantically and there's no use case left in nixpkgs. sternenseemann2022-05-231-2/+4
* | | | lib/systems/parse: don't consider mode switching CPUs compatible•••Since we (exclusively) use isCompatible to gauge whether platform a can execute binaries built for platform b, mode switching CPUs are not to be considered compatible for our purposes: Switching the mode of a CPU usually requires a reset. At the very least we can't execute a mix of executables for the two modes which would usually be the case in nixpkgs where we may want to execute buildInputs for the hostPlatform in addition to nativeBuildInputs for the buildPlatform. sternenseemann2022-05-231-13/+6
* | | | 22.11 is RaccoonJanne Heß2022-05-231-1/+1
* | | | Merge pull request #168374 from Ma27/special-attrs-in-with-recursion•••lib/generators: withRecursion: don't break attr-sets with special attrsSilvan Mosberger2022-05-232-1/+26
|\ \ \ \
| * | | | lib/generators: withRecursion: don't break attr-sets with special attrs•••Closes #168327 The issue reported there can be demonstrated with the following expression: → nix-instantiate --eval -E "with import ./. {}; pkgs.lib.options.showDefs [ { file = \"foo\"; value = pkgs.rust.packages.stable.buildRustPackages; } ]" error: attempt to call something which is not a function but a string at /home/ma27/Projects/nixpkgs/lib/trivial.nix:442:35: 441| isFunction = f: builtins.isFunction f || 442| (f ? __functor && isFunction (f.__functor f)); | ^ 443| Basically, if a `__functor` is in an attribute-set at depth-limit, `__functor` will be set to `"<unevaluated>"`. This however breaks `lib.isFunction` which checks for a `__functor` by invoking `__functor` with `f` itself. The same issue - "magic" attributes being shadowed by `withRecursion` - also applies to others such as `__pretty`/`__functionArgs`/`__toString`. Since these attributes have a low-risk of causing a stack overflow (because these are flat attr-sets or even functions), ignoring them in `withRecursion` seems like a valid solution. Maximilian Bosch2022-04-122-1/+26
* | | | | lib.systems: remove supported, replace with flakeExposed•••Since the list only gates the platforms the nixpkgs flake exposes packages to build on, the `hydra` label made little sense. It was also only used for this purpose, so the `tier*` attributes were largely unnecessary. To reflect the intention more accurately, we expose `lib.systems.flakeExposed` and use it to gate flake.nix's system list. sternenseemann2022-05-233-27/+39
* | | | | systems: support cross-compiling for Renesas RX microcontrollers (#173858)yvt2022-05-224-1/+9