about summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2023-04-04Merge pull request #221204 from tweag/deprecate-paths-to-stringsSilvan Mosberger1-11/+75
lib.strings: Prevent paths as inputs in some functions
2023-04-04Merge pull request #222516 from ncfavier/options-better-errorNaïm Favier2-5/+9
lib/modules: better error for invalid option declarations
2023-04-01Merge pull request #219826 from noctarius/masterMario Rodas1-0/+7
Fixed TimescaleDB License Information
2023-03-24lib/customisation: callPackageWith should abort with errorsCole Helbling1-1/+1
ofborg relies on the behavior that existed prior to 1c00bf394867b07ed7a908408d8bc1d0afd9fa49, where evaluation would immediately abort due to a missing argument (whether it be an aliased package when `allowAliases = false;` or a typo'd or otherwise nonexistent package). If `callPackageWith` `throw`s instead of `abort`s, the following `nix-env` invocation does not fail fast but instead silently skips the attribute (assuming there is a package that has an aliased package in its `autoArgs`): $ nix-env -qa --json --file . --arg config '{ allowAliases = false; }' &>/dev/null $ echo $? 0 This does change the error output when there is a missing package (for any of the reasons mentioned above), though. Before this change, the errors looked like this: $ nix-build -A hello --arg config '{ allowAliases = false; }' error: … while calling the 'throw' builtin at /home/vin/workspace/vcs/nixpkgs/master/lib/customisation.nix:179:65: 178| 179| in if missingArgs == [] then makeOverridable f allArgs else throw error; | ^ 180| error: Function called without required argument "bash_5" at /home/vin/workspace/vcs/nixpkgs/master/pkgs/applications/misc/hello/default.nix:8, did you mean "bash" or "bashdb"? And the errors now look like this: $ nix-build -A hello --arg config '{ allowAliases = false; }' error: … while calling the 'abort' builtin at /home/vin/workspace/vcs/nixpkgs/master/lib/customisation.nix:179:65: 178| 179| in if missingArgs == [] then makeOverridable f allArgs else abort error; | ^ 180| error: evaluation aborted with the following error message: 'Function called without required argument "bash_5" at /home/vin/workspace/vcs/nixpkgs/master/pkgs/applications/misc/hello/default.nix:8, did you mean "bash" or "bashdb"?'
2023-03-24timescaledb: Fixed the licensing for the timescaledb package to be split ↵Christoph Engelbert (noctarius)1-0/+7
into TSL (Timescale Community License) and Apache 2.0 components. TimescaleDB provides two types of licenses, Apache 2.0 and Timescale Community License (TSL), with different feature sets. While all the code is in the same repository, the build system can build both versions depending on the build parameters set in. Co-authored-by: Emily Lange <git@indeednotjames.com>
2023-03-22lib/modules: better error for invalid option declarationsNaïm Favier2-5/+9
Make `byName` aware of whether it's processing options or config to give slightly more accurate error messages.
2023-03-16Merge pull request #219747 from Stunkymonkey/deprecate-isNullBernardo Meurer1-1/+1
2023-03-15lib.strings.remove{Prefix,Suffix}: Deprecate for path prefix/suffix argumentsSilvan Mosberger1-5/+23
See also parent commits
2023-03-15lib.strings.normalizePath: Deprecate for path valuesSilvan Mosberger1-1/+14
There's no need to call this function on path data types, and it's confusing with the new lib.path library functions
2023-03-15lib.strings: Deprecate path prefix/suffix/infix argumentsSilvan Mosberger1-5/+38
lib.{hasPrefix,hasInfix,hasSuffix} would otherwise return an always-false result, which can be very unexpected: nix-repl> lib.strings.hasPrefix ./lib ./lib/meta.nix false
2023-03-14Merge pull request #209099 from infinisil/lib.path.subpath.joinSilvan Mosberger2-0/+107
lib.path.subpath.join: init
2023-03-13Merge pull request #219027 from NixOS/haskell-updatessternenseemann4-4/+7
haskellPackages: update stackage and hackage; haskellPackages.ghc: 9.2.6 -> 9.2.7
2023-03-11init: lib.foldlAttrshsjobeki3-1/+92
- provide comprehensive example - add unit test
2023-03-10Merge master into haskell-updatesgithub-actions[bot]7-6/+176
2023-03-09lib.systems: don't try to emulate s390-linuxAlyssa Ross1-1/+2
We don't have an emulator that can do this.
2023-03-09Merge pull request #211855 from ↵Robert Hensing6-5/+174
hercules-ci/lib-modules-disabledModules-module-with-key lib/modules: Allow an "anonymous" module with key in disabledModules
2023-03-09Merge master into haskell-updatesgithub-actions[bot]3-91/+10
2023-03-08haskell.compiler.ghcHEAD: 9.7.20221224 -> 9.7.20230217sternenseemann4-4/+7
- Christmas is over! - Upstream has changed the name of the target triplet used for the JS backend from js-unknown-ghcjs to javascript-unknown-ghcjs, since Cabal calls the architecture "javascript": https://gitlab.haskell.org/ghc/ghc/-/commit/6636b670233522f01d002c9b97827d00289dbf5c Since the triplet is made up anyways, i.e. autoconf does not support it and Rust uses different triplets for its emscripten backends, we'll just change it as well. - Upstream fixed the problem with ar(1) being invoked incorrectly by stage0: https://gitlab.haskell.org/ghc/ghc/-/commit/e987e345c807035e4637ca3eae227ae501e16c42
2023-03-08Merge pull request #214941 from OPNA2608/init/katawa-shoujoSandro1-0/+6
katawa-shoujo: init at 1.3.1
2023-03-08lib: remove deprecated functionspennae2-91/+4
all of these have been deprecated and raising warnings since 18.09. it's about time we actually made good on "will be removed in the next release".
2023-03-07Merge pull request #211950 from Atemu/armv8-no-more-armv7Atemu1-13/+2
lib/systems/parse: stop considering armv8a able to execute armv7l
2023-03-06treewide: deprecate isNullFelix Buehler1-1/+1
https://nixos.org/manual/nix/stable/language/builtins.html#builtins-isNull
2023-03-05Merge pull request #210125 from OPNA2608/fix/pdisk_patchurlSandro1-1/+0
2023-03-05lib/options: fix mkPackageOption docspennae1-7/+5
nixdoc takes everything from Type: to Example: as the type, which misrendered a large part of the docs. it also drops sorely needed spaces where the type had line breaks, so all has to be on one line (or use non-standard literal spaces, which is probably worse). also clarify what the `?` for arguments mean while we're here.
2023-03-04lib/strings: hide asciiTableNaïm Favier1-2/+2
Since it's an attribute set, the lib function location generating code tries to generate locations for each of the characters...
2023-03-04Merge pull request #219235 from patwid/strings-escape-query-for-url-encodingValentin Gagarin4-5/+32
2023-03-03strings: add escapeQuery for url encodingPatrick Widmer4-5/+32
2023-03-01lib/modules: Allow an "anonymous" module with key in disabledModulesRobert Hensing6-5/+174
This makes the following work disabledModules = [ foo.nixosModules.bar ]; even if `bar` is not a path, but rather a module such as { key = "/path/to/foo#nixosModules.bar"; config = ...; } By supporting this, the user will often be able to use the same syntax for both importing and disabling a module. This is becoming more relevant because flakes promote the use of attributes to reference modules. Not all of these modules in flake attributes will be identifiable, but with the help of a framework such as flake-parts, these attributes can be guaranteed to be identifiable (by outPath + attribute path).
2023-02-26Merge master into staging-nextgithub-actions[bot]1-15/+48
2023-02-26lib/options: Add more options to mkPackageOptionAnselm Schüler1-15/+48
2023-02-23Merge master into staging-nextgithub-actions[bot]1-5/+5
2023-02-23lib.licenses.asl20-llvm: replace llvm-exceptionAlyssa Ross1-5/+5
LLVM-exception only makes sense when used with the Apache 2.0 license, so let's combine them, so it's not possible to forget one of them like happened with llvm_15.
2023-02-23Merge master into staging-nextgithub-actions[bot]1-9/+57
2023-02-23improves: comprehensivenesshsjobeki1-8/+3
2023-02-23add better documentation comments to lib.runTestshsjobeki1-6/+59
2023-02-21Merge master into staging-nextgithub-actions[bot]1-6/+4
2023-02-21Merge pull request #216983 from ncfavier/showOption-commentNaïm Favier1-6/+4
lib/options: update showOption comment
2023-02-18lib/options: update showOption commentNaïm Favier1-6/+4
2023-02-15Merge master into staging-nextgithub-actions[bot]1-6/+13
2023-02-15Merge pull request #203539 from SuperSandro2000/architectures-expand-inferiorsSandro1-6/+13
lib/systems/architectures: expand inferiors
2023-02-13lib.path.subpath.join: initSilvan Mosberger2-0/+107
This function can be used to safely join subpaths together
2023-02-10Merge staging-next into staginggithub-actions[bot]1-2/+5
2023-02-10Merge pull request #215455 from domenkozar/module-errorsDomen Kožar1-2/+5
nixos: Improve module conflict error messages
2023-02-09lib/licenses.nix: Add cc-by-nc-nd-30OPNA26081-0/+6
2023-02-09types: suggest how to resolve the conflictDomen Kožar1-2/+5
2023-02-09types: explicitly state unique options are expected to be uniqueDomen Kožar1-1/+1
2023-02-07Merge staging-next into staginggithub-actions[bot]3-8/+109
2023-02-07Merge pull request #214930 from sheepforce/nwchemmarkuskowa1-0/+7
nwchem: init at 7.0.2
2023-02-07Merge pull request #208887 from tweag/lib.path.appendSilvan Mosberger2-8/+102
lib.path.append: init
2023-02-07lib/licenses: add ecl20Phillip Seeber1-0/+7