summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2022-10-10treewide: optional -> optionals where the argument is a listArtturin1-1/+1
the argument to optional should not be list
2022-10-09Merge staging-next into staginggithub-actions[bot]1-0/+5
2022-10-09Merge master into staging-nextgithub-actions[bot]1-0/+5
2022-10-09licenses: add libssh2 licenseWeijia Wang1-0/+5
2022-10-07lib.closePropagation: Remove the quadratic behavior in lib.closePropagationGuillaume Bouchard1-1/+30
The code of `lib.closePropagation` was internally using a recursion on the dependencies and returns all the derivation directly or indirectly referenced by buildInputs. `lib.closeProgation` is implemented in pure nix and uses an unique function for list which is quadratic and does "true" equality, which needs deep set comparison. Instead, we use the `builtins.genericClosure` which is implemented as a builtin and uses a more efficient sorting feature. Note that `genericClosure` needs a `key` to discriminate the values, we used the `outPath` which is unique and orderable. On benchmarks, it performs up to 15x time faster on a benchmark related to haskellPackages.ghcWithPackages.
2022-10-05Merge remote-tracking branch 'origin/master' into staging-nextMartin Weinelt1-0/+5
2022-10-03Merge pull request #188265 from steveeJ-forks/pr-holochain-launcher-binSandro1-0/+5
2022-10-02Merge master into staging-nextgithub-actions[bot]6-17/+4
2022-10-01Merge pull request #193132 from figsoda/clean-upfigsoda6-17/+4
treewide: clean up
2022-09-29Merge master into staging-nextgithub-actions[bot]2-0/+13
2022-09-29lib/systems/default.nix: add efiArch suffixesIvan Nikolaenko1-0/+8
Move already implemented functionality to the upper level so it could be used in a more generic way. Signed-off-by: Ivan Nikolaenko <ivan.nikolaenko@unikie.com>
2022-09-28lib.generators: simplify toYAMLfigsoda1-1/+1
2022-09-28Merge pull request #192650 from drupol/add-sphinx-contrib-mscgenMartin Weinelt1-0/+5
2022-09-28Merge staging-next into staginggithub-actions[bot]6-1/+180
2022-09-28licenses: add BOLA licensePol Dellaiera1-0/+5
2022-09-28Merge pull request #191540 from hercules-ci/nixosTest-modularRobert Hensing6-1/+180
nixosTest: make modular
2022-09-26lib/tests/maintainers.nix: remove unused bindingfigsoda1-1/+0
2022-09-26lib/types.nix: remove unused bindingsfigsoda1-2/+0
2022-09-26lib/sources.nix: remove unused bindingfigsoda1-1/+0
2022-09-26lib/options.nix: remove unused bindingfigsoda1-1/+0
2022-09-26lib/modules.nix: remove unused bindingsfigsoda1-9/+1
2022-09-26lib/generators.nix: remove unused bindingsfigsoda1-2/+2
2022-09-26Merge staging-next into staginggithub-actions[bot]2-2/+17
2022-09-25lib/types.nix: Document that it should not be usedpiegames1-2/+16
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-09-25Merge branch 'amjoseph-nixpkgs-pr/resume182058' into stagingtoonn1-0/+14
2022-09-25unionOfDisjoint: use builtins.intersectAttrsAdam Joseph1-5/+8
This brings two benefits: 1. The complete list of collisions is printed in the whenever any colliding attribute is accessed. 2. The sets are intersected using a C++ primitive, which runs in O(n) time (intersecting pre-sorted lists) with small constants rather than interpreted Nix code. Thanks to @toonn for prompting this improvement.
2022-09-24Merge pull request #189836 from erikarvstedt/options-definitionsWithLocationsRobert Hensing1-0/+1
lib/modules: add `definitionsWithLocations` to evaluated options
2022-09-21lib/modules: Fix meta duplication in shorthand syntaxRobert Hensing3-1/+24
2022-09-21lib: Add lazyDerivationRobert Hensing3-0/+156
2022-09-17lib.types: Add parentheses where description is ambiguousRobert Hensing2-13/+122
2022-09-15lib.licenses: add CAL-1.0Stefan Junker1-0/+5
2022-09-13Merge pull request #189314 from Artturin/addemulatoravailableArtturi1-30/+39
2022-09-12note that `unionOfDisjoint` is commutative, unlike //Adam Joseph1-1/+2
2022-09-12lib/attrsets.nix: add unionOfDisjointAdam Joseph1-0/+10
2022-09-11lib/systems: add emulatorAvailableArtturin1-30/+39
``` nix-repl> pkgsCross.arm-embedded.stdenv.hostPlatform.emulatorAvailable pkgsCross.arm-embedded.buildPackages false nix-repl> pkgsCross.aarch64-multiplatform.stdenv.hostPlatform.emulatorAvailable pkgsCross.aarch64-multiplatform.buildPackages true ``` will be useful for stuff like handling https://github.com/NixOS/nixpkgs/issues/187109
2022-09-10lib/options: deprecate docbook text and literalDocBookpennae1-1/+4
deprecate literalDocBook by adding a warning (that will not fire yet) to its uses and other docbook literal strings by adding optional warning message to mergeJSON.
2022-09-09Merge pull request #181834 from ncfavier/numbersSilvan Mosberger1-9/+33
lib/types: add `number`
2022-09-06lib/systems: uname.processor is "uname -m", not "uname -p" (#189958)Adam Joseph1-1/+1
The comment in lib/systems/default.nix for uname.processor indicates that it should match `uname -p`. I tried that command and found that it reports `unknown` on all of these machines: - `x86_64-linux` - `aarch64-linux` - `mips64el-linux` - `powerpc64le-linux` The command `uname -m` reports the expected value on all of the above. I think the comment is wrong. So I fixed it.
2022-09-05lib/modules: add `definitionsWithLocations` to evaluated optionsErik Arvstedt1-0/+1
This attr provides the location of each definition. This is particularly useful for introspecting options of type `attrsOf`. E.g., it allows finding the location of a systemd service definition by parsing `options.systemd.services.definitionsWithLocations`.
2022-09-05Merge pull request #161118 from arkivm/init-dwarf2jsonJonas Heinrich1-0/+5
dwarf2json: init at unstable-2021-04-15
2022-09-01Merge branch 'master' into option-docs-mdpennae7-6/+32
2022-08-31lib/modules: convert option description to MDpennae2-78/+44
2022-08-31Merge pull request #188289 from erikarvstedt/fix-disabled-modules-abs-pathsRobert Hensing3-1/+9
lib.modules: support strings with absolute paths in `disabledModules`
2022-08-31lib.modules: support strings with absolute paths in `disabledModules`Erik Arvstedt3-1/+9
This is particularly useful for disabling modules defined in a flake. Example: disabledModules = [ "${flake}/modules/mymodule.nix" ]; Previously, absolute string paths were internally prepended with `modulesPath`, which caused the module filtering to fail.
2022-08-30lib/options: add mdDoc support to mkEnableOptionpennae1-1/+4
2022-08-28lib/systems/doubles: add ELFvx GNU ABIsMinijackson1-1/+3
2022-08-28lib/systems: add convenience isAbiElfv2 functionMinijackson1-0/+7
2022-08-28lib/systems/examples: use provided ABIs in PPC64 tripleMinijackson1-3/+2
2022-08-28lib/systems/parse: use ELFv2 by default for PPC64 BEMinijackson1-0/+2
2022-08-28lib/systems: add elfv1 / elfv2 ABIsMinijackson2-1/+9