Commit Graph

3321 Commits

Author SHA1 Message Date
Adam Joseph
ed65f784a7
Merge pull request #191995 from amjoseph-nixpkgs/lib/systems/inspect/comment
lib/systems/inspect.nix: explanatory comment
2023-04-24 02:21:36 +00:00
Matthieu Coudron
377b6c7bc1
Merge pull request #225496 from ony/feature/generators-toLua
lib/generators: add toLua/mkLuaInline
2023-04-23 20:45:01 +02:00
Mykola Orliuk
e9b416168a lib.generators.toLua: allow disabling multiline 2023-04-23 19:46:14 +02:00
Mykola Orliuk
a48fd10c86 lib.generators.toLua: tune comment for noogle use
See https://github.com/nix-community/noogle
2023-04-23 19:46:13 +02:00
Mykola Orliuk
4ec4c6fda9 lib/generators: add toLua/mkLuaInline
Suitable to simplify Lua-based configurations like neovim-lspconfig that
might need to interpolate Nix package paths.
2023-04-23 01:07:58 +02:00
Artturin
06e8d82e9c lib/systems: disable docs in qemu-user
45M -> 31M
2023-04-22 00:38:56 +03:00
zimbatm
ad0b21fbbc
lib: add missing removeAttrs builtin
I'm expecting all the builtins.* functions to be available in lib.*
2023-04-19 21:27:38 +02:00
Silvan Mosberger
4f35a58184
Merge pull request #221204 from tweag/deprecate-paths-to-strings
lib.strings: Prevent paths as inputs in some functions
2023-04-04 18:35:06 +02:00
Naïm Favier
0d5c1ac149
Merge pull request #222516 from ncfavier/options-better-error
lib/modules: better error for invalid option declarations
2023-04-04 10:42:14 +02:00
Mario Rodas
c937feb1a1
Merge pull request #219826 from noctarius/master
Fixed TimescaleDB License Information
2023-04-01 09:19:04 -05:00
Cole Helbling
d9f767600f lib/customisation: callPackageWith should abort with errors
ofborg relies on the behavior that existed prior to
1c00bf3948, 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-24 14:22:11 -07:00
Christoph Engelbert (noctarius)
4f7f469c82
timescaledb: Fixed the licensing for the timescaledb package to be split 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-24 11:12:12 +01:00
Naïm Favier
8751764236
lib/modules: better error for invalid option declarations
Make `byName` aware of whether it's processing options or config to give
slightly more accurate error messages.
2023-03-22 12:37:28 +01:00
Bernardo Meurer
6e55733359
Merge pull request #219747 from Stunkymonkey/deprecate-isNull 2023-03-16 11:10:22 -03:00
Silvan Mosberger
61012f6daf lib.strings.remove{Prefix,Suffix}: Deprecate for path prefix/suffix arguments
See also parent commits
2023-03-15 19:51:38 +01:00
Silvan Mosberger
5e8b9de728 lib.strings.normalizePath: Deprecate for path values
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-15 19:42:45 +01:00
Silvan Mosberger
99bc90e301 lib.strings: Deprecate path prefix/suffix/infix arguments
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-15 19:42:43 +01:00
Silvan Mosberger
b611afeb74
Merge pull request #209099 from infinisil/lib.path.subpath.join
lib.path.subpath.join: init
2023-03-14 20:47:47 +01:00
sternenseemann
755c177ff9
Merge pull request #219027 from NixOS/haskell-updates
haskellPackages: update stackage and hackage; haskellPackages.ghc: 9.2.6 -> 9.2.7
2023-03-13 11:36:33 +01:00
hsjobeki
15a8d05ba5 init: lib.foldlAttrs
- provide comprehensive example
- add unit test
2023-03-11 10:42:00 +01:00
github-actions[bot]
bf7ad8aa57
Merge master into haskell-updates 2023-03-10 00:14:11 +00:00
Alyssa Ross
bc7d355dc0 lib.systems: don't try to emulate s390-linux
We don't have an emulator that can do this.
2023-03-09 19:25:23 +00:00
Robert Hensing
6b79fe8cdc
Merge pull request #211855 from hercules-ci/lib-modules-disabledModules-module-with-key
lib/modules: Allow an "anonymous" module with key in disabledModules
2023-03-09 16:16:37 +01:00
github-actions[bot]
4bda2ab514
Merge master into haskell-updates 2023-03-09 00:13:40 +00:00
sternenseemann
471b9cab41 haskell.compiler.ghcHEAD: 9.7.20221224 -> 9.7.20230217
- 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":
  6636b67023

  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:
  e987e345c8
2023-03-08 17:12:18 +01:00
Sandro
7f917aebcd
Merge pull request #214941 from OPNA2608/init/katawa-shoujo
katawa-shoujo: init at 1.3.1
2023-03-08 11:13:54 +01:00
pennae
61852b7faa lib: remove deprecated functions
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-08 03:57:38 +01:00
Atemu
19e81a9269
Merge pull request #211950 from Atemu/armv8-no-more-armv7
lib/systems/parse: stop considering armv8a able to execute armv7l
2023-03-07 19:25:32 +01:00
Felix Buehler
d10e69c86b treewide: deprecate isNull
https://nixos.org/manual/nix/stable/language/builtins.html#builtins-isNull
2023-03-06 22:40:04 +01:00
Sandro
5a695ebb77
Merge pull request #210125 from OPNA2608/fix/pdisk_patchurl 2023-03-05 18:09:01 +01:00
pennae
f0e8db002b lib/options: fix mkPackageOption docs
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-05 01:21:46 +01:00
Naïm Favier
a342ebe166
lib/strings: hide asciiTable
Since it's an attribute set, the lib function location generating code
tries to generate locations for each of the characters...
2023-03-04 13:20:49 +01:00
Valentin Gagarin
61cf0b2166
Merge pull request #219235 from patwid/strings-escape-query-for-url-encoding 2023-03-04 12:38:57 +01:00
Patrick Widmer
7089294f10 strings: add escapeQuery for url encoding 2023-03-03 20:48:55 +01:00
Robert Hensing
118bdf25a6 lib/modules: Allow an "anonymous" module with key in disabledModules
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-03-01 15:03:44 +01:00
github-actions[bot]
399e2c78d4
Merge master into staging-next 2023-02-26 06:01:09 +00:00
Anselm Schüler
9769e90233 lib/options: Add more options to mkPackageOption 2023-02-26 03:00:22 +01:00
github-actions[bot]
4688cd53b6
Merge master into staging-next 2023-02-23 18:01:15 +00:00
Alyssa Ross
7ce8e7c4cf lib.licenses.asl20-llvm: replace llvm-exception
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-23 17:42:15 +00:00
github-actions[bot]
390b789c39
Merge master into staging-next 2023-02-23 12:01:07 +00:00
hsjobeki
09ee6241b5 improves: comprehensiveness 2023-02-23 11:24:47 +01:00
hsjobeki
70c36dcfb8 add better documentation comments to lib.runTests 2023-02-23 10:21:58 +01:00
github-actions[bot]
fd8dd0c966
Merge master into staging-next 2023-02-21 18:01:08 +00:00
Naïm Favier
f77c364def
Merge pull request #216983 from ncfavier/showOption-comment
lib/options: update showOption comment
2023-02-21 16:31:07 +01:00
Naïm Favier
6c7d4d4f9d
lib/options: update showOption comment 2023-02-18 18:13:11 +01:00
github-actions[bot]
bf5abe92d4
Merge master into staging-next 2023-02-15 18:01:14 +00:00
Sandro
d05e6727a2
Merge pull request #203539 from SuperSandro2000/architectures-expand-inferiors
lib/systems/architectures: expand inferiors
2023-02-15 16:27:00 +01:00
Silvan Mosberger
1a2c2846b0 lib.path.subpath.join: init
This function can be used to safely join subpaths together
2023-02-13 14:01:17 +01:00
github-actions[bot]
0417b0e54f
Merge staging-next into staging 2023-02-10 00:03:00 +00:00
Domen Kožar
844a738b1f
Merge pull request #215455 from domenkozar/module-errors
nixos: Improve module conflict error messages
2023-02-10 02:42:28 +07:00