aboutsummaryrefslogtreecommitdiff
path: root/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib/string: drop redundant string in description of toInt.Alex Brandt2020-12-051-1/+1
| | | | | Describing the string argument as a string is redundant and not needed to describe what this function does.
* lib/strings: fix typo in exampleAlex Brandt2020-12-041-2/+2
| | | | | | The example refers to a snake_case function name but Nix uses camelCase function names. This ensures the example is correct for the given function.
* lib/strings: fix examples for enableFeatureAsAlex Brandt2020-12-031-2/+2
| | | | | The As was missing in the examples on this library function. This will ensure the examples refer to the function they document.
* Merge pull request #105294 from Ericson2314/platform-config-improvementsJohn Ericson2020-12-023-19/+23
|\ | | | | Platform config improvements
| * lib/systems/exmaple: `riscv-multiplatform` no longer needs parameterJohn Ericson2020-11-292-4/+4
| |
| * lib, binutils: Move Risc-V bfdEmulation to be by the othersJohn Ericson2020-11-291-1/+0
| |
| * lib.systems.platforms: Make selection more flexibleJohn Ericson2020-11-292-14/+19
| | | | | | | | | | | | We dont have to match on exact strings if we get accessed to `parsed`. Co-authored-by: Matthew Bauer <mjbauer95@gmail.com>
* | Merge pull request #105432 from tadfisher/remarkable-2-crossJohn Ericson2020-12-012-0/+20
|\ \ | | | | | | Cross-compile configuration for reMarkable 2 tablet
| * | Cross-compiling configuration for reMarkable 2 tabletTad Fisher2020-11-292-0/+20
| | |
* | | Merge pull request #99115 from Infinisil/toString-module-filesSilvan Mosberger2020-11-301-2/+2
|\ \ \ | |_|/ |/| | lib/modules: Make sure to not import module _file's into the store
| * | lib/modules: Make sure to not import module _file's into the storeSilvan Mosberger2020-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Previously if `_file` was specified by a module: trace: warning: The type `types.string' of option `foo' defined in `/nix/store/yxhm2il5yrb92fldgriw0wyqh2kk9qyc-bug.nix' is deprecated. See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types. With this change: trace: warning: The type `types.string' of option `foo' defined in `/home/infinisil/src/nixpkgs/bug.nix' is deprecated. See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types.
* | | Merge pull request #103884 from djanatyn/pkg/xlifeSandro2020-11-261-0/+5
|\ \ \ | |_|/ |/| |
| * | licenses: add HPND-sell-variantJonathan Strickland2020-11-151-0/+5
| | |
* | | Merge pull request #102503 from siraben/remarkable-initJohn Ericson2020-11-242-0/+19
|\ \ \ | | | | | | | | Initial implementation of remarkable1 cross-compile
| * | | Initial implementation of remarkable1 cross-compileBen Siraphob2020-11-232-0/+19
| | | |
* | | | lib.lists.unique: Switch from recursive function to using a foldadisbladis2020-11-241-7/+1
|/ / / | | | | | | | | | | | | This improves performance by ~30-40% for smaller test cases and makes larger cases where my laptop would OOM pass in seconds.
* | | lib: Create `makeScopeWithSplicing`John Ericson2020-11-192-1/+28
| | | | | | | | | | | | | | | It's ugly as hell, but I suppose it is needed to codify how to make spliced package sets.
* | | Merge master into staging-nextFrederik Rietdijk2020-11-168-19/+64
|\ \ \
| * \ \ Merge pull request #102766 from siraben/mmixJohn Ericson2020-11-145-16/+32
| |\ \ \ | | | | | | | | | | Initial implementation of cross-compilation to Knuth's MMIX
| | * | | Initial implementation of mmix cross-compileBen Siraphob2020-11-095-16/+32
| | | | |
| * | | | lib: Add composeManyExtensionsJoe Hermaszewski2020-11-133-3/+32
| | |/ / | |/| |
* | | | Merge staging-next into stagingFrederik Rietdijk2020-11-111-2/+6
|\| | |
| * | | Merge pull request #44928 from vcunat/p/configure-assertEelco Dolstra2020-11-111-2/+6
| |\ \ \ | | | | | | | | | | lib/strings: guard against an easy mistake
| | * | | lib/strings: guard against an easy mistakeVladimír Čunát2018-08-121-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | This would catch the bad `fwknop` flags fixed in 580cab57e4, during evaluation already.
* | | | | Initial support for OpenRISC 1000 (or1k)Samuel Dionne-Riel2020-11-094-0/+11
|/ / / /
* | / / lib/sources.nix: fix incorrect inheritV2020-10-301-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | split comes from builtins, not lib. error: attribute 'split' missing, at /nix/path/nixpkgs/lib/sources.nix:4:4 (use '--show-trace' to show detailed location information)
* | | lib/types.nix: fix missing inheritKeshav Kini2020-10-261-0/+3
| | | | | | | | | | | | | | | | | | | | | I think there was a silent (i.e. semantic) merge conflict between PR #101139 and PR #100456. This commit should fix the error, which manifests as follows: error: undefined variable 'boolToString' at /home/kkini/src/nixpkgs/lib/types.nix:552:42
* | | Merge pull request #101139 from roberth/lib-use-static-scope-checkingRobert Hensing2020-10-269-86/+265
|\ \ \ | | | | | | | | lib: Use Nix's static scope checking, fix error message, optimize
| * | | lib/sources.nix: Prefer lib for readFile inheritRobert Hensing2020-10-221-1/+1
| | | |
| * | | lib: Add lib.trace for consistencyRobert Hensing2020-10-221-1/+1
| | | | | | | | | | | | | | | | This puts it among the trace* family of functions derived from it.
| * | | lib/modules: Simplify inheritsRobert Hensing2020-10-221-34/+32
| | | |
| * | | lib: Add lib.isFloat for consistencyRobert Hensing2020-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | Unlike the other three is* functions in lib.trivial, it was only available as lib.trivial.isFloat
| * | | lib/options.nix: Use merge-friendly inherit syntaxRobert Hensing2020-10-221-5/+30
| | | |
| * | | lib: Use Nix's static scope checking, fix error message, optimizeRobert Hensing2020-10-229-82/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nix can perform static scope checking, but whenever code is inside a `with` expression, the analysis breaks down, because it can't know statically what's in the attribute set whose attributes were brought into scope. In those cases, Nix has to assume that everything works out. Except it doesnt. Removing `with` from lib/ revealed an undefined variable in an error message. If that doesn't convince you that we're better off without `with`, I can tell you that this PR results in a 3% evaluation performance improvement because Nix can look up local variables by index. This adds up with applications like the module system. Furthermore, removing `with` makes the binding site of each variable obvious, which helps with comprehension.
| * | | lib/types.nix: Use // instead of mergeAttrsRobert Hensing2020-10-221-1/+1
| | | |
| * | | lib/options.nix: Use head instead of elemAt _ 0Robert Hensing2020-10-221-1/+1
| | | |
* | | | Merge pull request #101409 from rycee/dbus-warningGabriel Ebner2020-10-251-1/+1
|\ \ \ \
| * | | | docs: update documentation of `mkRemovedOptionModule`Robert Helgesson2020-10-241-1/+1
| |/ / / | | | | | | | | | | | | | | | | Since b08b0bcbbec77046e5a7082177cedc12fbf1dc6c, the function actually causes an assertion error, not a warning.
* | | | Merge pull request #100456 from maralorn/boolToStringAndreas Rammhold2020-10-251-1/+1
|\ \ \ \ | |/ / / |/| | | treewide: De-inline uses of lib.boolToString
| * | | treewide: De-inline uses of lib.boolToStringMalte Brandy2020-10-141-1/+1
| | | | | | | | | | | | | | | | This commit should not change eval results
* | | | Merge pull request #100953 from AtnNn/splitStringsSilvan Mosberger2020-10-202-21/+28
|\ \ \ \ | | | | | | | | | | Implement splitString using builtins.split
| * | | | lib.splitString: use builtin.splitEtienne Laurin2020-10-182-21/+28
| |/ / /
* | | | lib: Add readTree function to filesystemFarid Zakaria2020-10-191-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a friendly function to easily return a flattened list of files within a directory. This is useful if you want to easily iterate or concatSep the list of files all found within a directory. (i.e. when constructing Java's CLASSPATH) Style improvements Co-authored-by: Silvan Mosberger <github@infinisil.com>
* | | | Merge branch 'master' into staging-nextVladimír Čunát2020-10-103-1/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Quite many rebuilds from master: > Estimating rebuild amount by counting changed Hydra jobs. > 3926 x86_64-darwin > 4645 x86_64-linux
| * | | Merge pull request #96641 from zimbatm/data-module-importszimbatm2020-10-093-1/+24
| |\ \ \ | | | | | | | | | | nixos: Data module imports
| | * | | lib: allow to import JSON and TOML fileszimbatm2020-09-121-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vision here is that configuration tools can generate .json or .toml files, which can be plugged into an existing configuration. Eg: { lib, ... }: { imports = [ (lib.modules.importJSON ./hardware-configuration.json) ]; }
| | * | | lib: add importTOMLzimbatm2020-09-122-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Complements the `lib.importJSON`. `builtins.readTOML` has been introduced in Nix 2.1.
* | | | | Merge staging-next into stagingFrederik Rietdijk2020-10-061-0/+1
|\| | | |
| * | | | lib/types: Fix type description of bool enum valuesSilvan Mosberger2020-10-031-0/+1
| | |_|/ | |/| | | | | | | | | | Previously bool values would show as <bool>
* | | | Merge branch 'staging-next' into stagingJan Tojnar2020-09-244-33/+55
|\| | |