Although Lens is based on a free core component ("OpenLens"), the tarballs
provided by Mirantis include a proprietary version of Lens that requires
a subscription.
As the proprietary option offers additional features, it would not be wise
to simply rewrite the derivation and base it on the FOSS source code.
Instead, implementing a new derivation for OpenLens is likely the better
approach.
I imagine this was supposed to be rustc = args.rustc, like the other
two lines. This meant that we accepted both rust and rustc
attributes, with the same effect. I doubt anybody was using the
undocumented, probably-accidental "rust" spelling, but we should
remove it before somebody starts.
In fact, we don't need to set rustc here at all, because no value
platforms.select could return will ever include a rustc key (unlike
the other two), so then rustc will be filled in later, when args is
merged into final.
This is to avoid stealing keys from submodules. `class` might be
common enough that reinterpreting existing `class` attributes in
configurations as a declaration leads to fairly widespread problems.
This is appears to be a fairly common mistake for beginners who want
to build larger things from the system configurations, such as NixOps
networks, etc. Further explanation seems appropriate.
The supposedly public nature of these functions has been holding
back module system maintenance, while usages of these functions
are expected to be rare. If used anywhere, presumably they're
emulating module system behavior because some use case isn't supported
properly. We should try to support such a use case directly, if it
even exists.
Some options have their default value set in the `config` instead of
`default`, for example to push `mkDefault`s down an attribute set.
In those cases, it's useful to provide a `defaultText` for informational
purposes.
Previously, there was no way to unset an option when overriding a
kernel, apart from writing out the attrset yourself. Now it's
possible with lib.mkForce lib.kernel.unset. It's important to be able
to do this, because setting an option in the override may cause other
options to become unused, which would fail the config build unless
they were overridden too.
It makes sense to allow platform definitions to opt out of having libc
at all. One use case would be targetting some obscure new Linux
target that doesn't have a libc implementation yet, and another is
UEFI, which is basically libc-less Windows.
Not having libc is not commonly specified in (GNU) triples (even
Linux's build system will just target either -gnu or -musl depending
on the platform), so instead, we use a separate attribute for it.
With removePrefix introduced in a future commit this law can then be
used to derive
removePrefix p (append p s) == subpath.normalise s
=> (wrap with append)
append p (removePrefix p (append p s)) == append p (subpath.normalise s)
=> (append is not influenced by subpath normalisation)
append p (removePrefix p (append p s)) == append p s
=> (substitute q = append p s)
append p (removePrefix p q) == q
Not included in the docs because it's not that important, just shows
that the first statement is more general than the second one (because
this derivation doesn't work the other way)
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"?'
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>
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
- 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
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.
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).
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.