about summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2022-11-07haskell.compiler.ghc92: 9.2.4 -> 9.2.5sternenseemann1-1/+1
2022-11-06cross/mingw: fix emulator for mingw32Jörg Thalheim1-3/+2
2022-11-05Revert "lib,doc: remove obvious usages of toString on paths"Anderson Torres2-7/+7
2022-11-06lib,doc: remove obvious usages of toString on pathsArtturin2-7/+7
It gives a warning on the lazy-trees branch of Nix (NixOS/nix#6530) one of these was also giving me an error (the one in lib/trivial probably) ``` $ nix build warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/installer/sd-card/sd -image-aarch64.nix' and then accessing it is deprecated, at /home/artturin/nixgits/my-nixpkgs/lib/modules. nix:349:99 warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/.git' and then accessing it is dep recated, at /home/artturin/nixgits/my-nixpkgs/lib/sources.nix:35:32 warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/system/etc/etc.nix' and then accessing it is deprecated, at «stdin»:0 warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/system/etc/etc-activ ation.nix' and then accessing it is deprecated, at «stdin»:0 warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/installer/sd-card/sd -image-aarch64.nix' and then accessing it is deprecated, at «stdin»:0 error: cannot decode virtual path '/nix/store/virtual0000000000000000000000005-source' (use '--show-trace' to show detailed location information) ```
2022-11-05Merge pull request #199244 from markuskowa/fix-licensesmarkuskowa1-0/+5
Fix licenses in various packages
2022-11-03lib/tests/modules: Test doRenameRobert Hensing3-0/+32
2022-11-03lib.modules.doRename: Don't define warning, even as undefined, if not warning.Shea Levy1-2/+2
This fixes mkAliasOptionModule in systems with no warning option.
2022-11-02arkpandora_ttf: add licenseMarkus Kowalewski1-0/+5
2022-10-26lib: Automatically generate lib.filesytem docsSilvan Mosberger1-18/+40
2022-10-24Merge pull request #173949 from jacoblambda/fix-toInt-zero-paddingRobert Hensing4-8/+160
lib: add strings.toIntBase10 to parse zero-padded strings
2022-10-24lib.normalizePath: the empty string is not a valid regex on darwinGuillaume Girol1-1/+1
presumably due to using libc++'s regex lib instead of libstdc++ on linux Fixes https://github.com/NixOS/nixpkgs/pull/177273#issuecomment-1287562800
2022-10-23lib/strings: Update docs and restructured code to improve readability of ↵Jacob Abel3-22/+42
toInt and toIntBase10.
2022-10-23lib/strings: Improve error message for octal ambiguity in toIntJacob Abel1-3/+2
2022-10-23lib/strings: Refactor toInt into toInt and toIntBase10Jacob Abel4-21/+97
2022-10-23lib/strings: Update toInt to handle intermixed ws and zeros. Added testsJacob Abel3-8/+25
2022-10-23lib/strings: allow toInt to parse zero-padded stringsJacob Abel2-4/+44
2022-10-21Merge remote-tracking branch 'origin/master' into staging-nextMartin Weinelt1-0/+10
2022-10-21Merge pull request #196397 from fgaz/hikounomizu/initSandro1-0/+10
2022-10-21Merge master into staging-nextgithub-actions[bot]3-0/+149
2022-10-20lib/tests/misc: Add tests for charToInt, escapeC, and normalizePathDaniel Olsen1-0/+15
2022-10-20lib.strings: Add normalizePathajs1241-0/+10
dedupes extranous /'s in filepaths Co-authored-by: Daniel Olsen <daniel.olsen99@gmail.com>
2022-10-20lib.strings: Add function to do C-style escapingDaniel Olsen1-0/+13
2022-10-20lib.strings: Add function to convert character to numberDaniel Olsen2-0/+111
2022-10-20Merge master into staging-nextgithub-actions[bot]1-0/+6
2022-10-19Merge pull request #193551 from OPNA2608/init/mac-fdiskSandro1-0/+6
2022-10-19Merge branch 'master' into staging-nextJan Tojnar3-7/+13
; Conflicts: ; pkgs/development/tools/codespell/default.nix codespell 2.2.2 switched to pyproject & setuptools_scm: https://github.com/codespell-project/codespell/pull/2523
2022-10-18Merge pull request #194035 from Ma27/show-option-quotingRobert Hensing3-7/+13
lib/options/showOption: fix quoting of attr-names that are not identifiers
2022-10-17lib.licenses: add lal12 and lal13Francesco Gazzetta1-0/+10
2022-10-13Merge staging-next into staginggithub-actions[bot]1-1/+2
2022-10-13Merge pull request #192755 from hercules-ci/lib-types-unspecified-nameSilvan Mosberger1-1/+2
2022-10-13Merge branch 'master' into stagingVladimír Čunát1-5/+0
2022-10-13licenses: Add apsl10OPNA26081-0/+6
2022-10-12Merge pull request #193484 from wegank/gpl1-eolSandro1-5/+0
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-07lib/options/showOption: fix quoting of attr-names that are not identifiersMaximilian Bosch1-3/+9
Personally, I think that warnings such as warning: The option `services.redis.enable' defined in `/home/ma27/Projects/nixpkgs/test.nix@node-vm' has been renamed to `services.redis.servers..enable'. are fairly confusing because of the `..` and it's more correct to actually quote that. With this change the warning now looks like this: warning: The option `services.redis.enable' defined in `/home/ma27/Projects/nixpkgs/test.nix@node-vm' has been renamed to `services.redis.servers."".enable'. While implementing that I realized that you'd have a similar problem whenever you use attribute-names that aren't identifiers, e.g. services.nginx.virtualHosts."example.org".locations."/".invalid = 23; now results in the following error: error: The option `interactive.nodes.vm.services.nginx.virtualHosts."example.org".locations."/".invalid' does not exist. Definition values: - In `/home/ma27/Projects/nixpkgs/test.nix@node-vm': 23 Of course there are some corner-cases where this won't work: when generating the manual, you display submodules like this: services.nginx.virtualHosts.<name> Since `<name>` isn't a value, but an indicator for a submodule, it must not be quoted. This also applies to the following identifiers: * `*` for `listOf submodule` * `<function body>` for `functionTo` This might not be correct if you actually have a submodule with an attribute name called `<name>`, but I think it's an improvement over the current situation and for this you'd probably need to make even more complex changes to the module system.
2022-10-07lib/types: always use `<function body>` instead of `[function body]` to ↵Maximilian Bosch2-4/+4
indicate a function inside an option structure The motivation is to have a single identifier for that. Useful for the next commit where I'll try to escape option-parts correctly (options can be any kind of strings, but unless these are Nix identifiers, they must be quoted). Since `<function body>` (or `<name>`/`*`) are special identifiers in error messages and the manual, we need a unique way to mark an option part as function call because these are not to be quoted.
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-29licenses: remove gpl1Weijia Wang1-5/+0
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