about summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2022-07-04lib/trivial: Update oldestSupportedReleaseJanne Heß1-1/+1
2022-07-03lib.systems.examples: canonicalize MIPS triplesAlyssa Ross1-14/+12
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.
2022-07-02lib.licenses: add Aladdin Free Public Licensetoastal1-0/+6
2022-06-27lib/options: Add hint for debugging infinite recursion in docsRobert Hensing1-0/+2
2022-06-21lib/options: Add showOptionWithDefLocsRobert Hensing2-1/+8
2022-06-21Merge pull request #176146 from pennae/module-docs-markdownRobert Hensing2-1/+17
treewide: markdown option docs
2022-06-20teams/maintainers list: show instructions for validating the contentsGraham Christensen1-2/+2
2022-06-20maintainer teams: check them in lib testsGraham Christensen2-0/+54
2022-06-20maintainer lib test: extract maintainer moduleGraham Christensen2-31/+32
2022-06-20maintainers: remove longkeyidGraham Christensen1-1/+0
see https://dkg.fifthhorseman.net/blog/openpgp-key-ids-are-not-useful.html
2022-06-14lib/modules: Throw earlier when module function does not return attrsRobert Hensing3-3/+23
`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.
2022-06-14lib.deferredModule: Make it properly singularRobert Hensing2-2/+4
2022-06-14lib.types: Add deferredModuleWithRobert Hensing2-3/+25
2022-06-14lib.types.deferredModule: Allow path-typed module referencesRobert Hensing3-4/+5
2022-06-14lib.types.deferredModule: Improve reported locationRobert Hensing2-2/+2
2022-06-14lib/test/modules.sh: Test deferredModule error location fileRobert Hensing2-2/+11
2022-06-14lib.types: Add deferredModuleRobert Hensing3-0/+65
2022-06-14lib/types, lib/modules: Remove unused extensionOffsetRobert Hensing2-13/+1
2022-06-14lib/types: Use map instead of imap1 in submoduleWithRobert Hensing1-1/+1
2022-06-14lib/types: Simplify submoduleWith shorthandOnlyDefinesConfig handlingSilvan Mosberger1-12/+3
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
2022-06-14lib/tests: Add submodule file propagation testSilvan Mosberger2-0/+25
2022-06-12treewide: attempt at markdown option docspennae2-1/+17
2022-06-10Merge pull request #157480 from MatthewCroughan/in-pure-eval-modeRobert Hensing2-1/+8
lib: add inPureEvalMode
2022-06-10lib/modules: Fix missing prefix in extendModules when unset in both eval- ↵Robert Hensing1-1/+1
and extend-
2022-06-10Merge pull request #173621 from ncfavier/submodule-descriptionRobert Hensing1-6/+17
lib/types: allow custom `submoduleWith` descriptions
2022-06-09Merge pull request #177061 from ckiee/bitXOr-typoSilvan Mosberger1-1/+1
lib/zip-int-bits: fix typo: bitXOR -> bitXor
2022-06-09lib/zip-int-bits: fix typo: bitXOR -> bitXorckie1-1/+1
2022-06-08lib.systems.amd64-netbsd: removeAlyssa Ross1-2/+0
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.
2022-06-01Merge master into haskell-updatesgithub-actions[bot]1-1/+1
2022-05-31Merge master into haskell-updatesgithub-actions[bot]2-0/+20
2022-05-30Fix typo in compareLists docstringmichaelmouf1-1/+1
2022-05-30lib.sourceTypes: simplify implementationRobert Scott1-9/+3
Co-authored-by: Alexander Foremny <aforemny@posteo.de>
2022-05-30add mechanism for handling meta.sourceProvenance attributesRobert Scott2-0/+26
heavily based on patterns used by licenses infrastructure, so may appear overengineered for its initial level of use
2022-05-28haskell.compiler: ghc922 -> ghc923sternenseemann1-1/+1
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.
2022-05-27Merge pull request #174917 from alyssais/scaleway-c1sternenseemann2-9/+0
lib.systems: drop scaleway-c1
2022-05-27lib.systems: drop scaleway-c1Alyssa Ross2-9/+0
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
2022-05-25lib/systems/inspect.nix: remove isPowerPCAdam Joseph1-1/+0
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>
2022-05-25Merge pull request #171014 from hercules-ci/nixpkgs-warn-undeclared-optionsRobert Hensing1-1/+1
pkgs/top-level/config.nix: Add warnUndeclaredOptions
2022-05-24stdenv: fix evaluation of platform emulatorNick Cao1-1/+1
2022-05-23lib.systems: inform isCompatible users about removalsternenseemann1-0/+1
2022-05-23lib.systems.elaborate: expose canExecute predicate over isCompatiblesternenseemann1-2/+4
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.
2022-05-23lib/systems/parse: don't consider mode switching CPUs compatiblesternenseemann1-13/+6
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.
2022-05-2322.11 is RaccoonJanne Heß1-1/+1
2022-05-23Merge pull request #168374 from Ma27/special-attrs-in-with-recursionSilvan Mosberger2-1/+26
lib/generators: withRecursion: don't break attr-sets with special attrs
2022-05-23lib.systems: remove supported, replace with flakeExposedsternenseemann3-27/+39
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.
2022-05-22systems: support cross-compiling for Renesas RX microcontrollers (#173858)yvt4-1/+9
2022-05-19lib/types: allow custom `submoduleWith` descriptionsNaïm Favier1-6/+17
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`.
2022-05-17Merge pull request #172813 from hercules-ci/functionTo-properlyRobert Hensing3-1/+66
`lib.types.functionTo` type merging and docs
2022-05-16Merge pull request #170561 from klemensn/types-descriptionSilvan Mosberger2-4/+4
lib/types: Drop misleading plural from type descriptions
2022-05-15Revert "lib: init flakes.nix"adisbladis5-49/+0
This reverts commit PR #167947. Flakes aren't standardised and the `lib` namespace shouldn't be polluted with utilities that serve only experimental uses.