Age | Commit message (Collapse) | Author |
|
Also show types when nix cannot compare values of different types.
This is also more consistent since types are already shown when comparing values of the same not comparable type.
|
|
For example, "${{ foo = "bar"; __toString = x: x.foo; }}" evaluates
to "bar".
With this, we can delay calling functions like mkDerivation,
buildPythonPackage, etc. until we actually need a derivation, enabling
overrides and other modifications to happen by simple attribute set
update.
|
|
The text is just a conversion of comment from src/libexpr/primops.cc
|
|
|
|
|
|
The last one I tried was botchered anyway ...
|
|
|
|
We should probably disallow these, but until then, we shouldn't barf
with an assertion failure.
Fixes #738.
|
|
autoCallFunction now auto-calls functors
|
|
|
|
FreeBSD support with knowledge about Linux emulation
|
|
|
|
|
|
|
|
There is no libdl on FreeBSD. Instead the symbols are included in libc.
|
|
|
|
|
|
|
|
|
|
|
|
This can be used to implement functions like ‘imap’ (or for that
matter, ‘map’) without the quadratic complexity incurred by calling
‘++’ repeatedly.
|
|
This is a generalisation of replaceChars in Nixpkgs.
|
|
This fixes the quadratic behaviour of concatStrings/concatStringsSep
in Nixpkgs.
|
|
|
|
This reduces the number of Bindings allocations by about 10%.
|
|
Conflicts:
src/libexpr/eval.cc
|
|
The value pointers of lists with 1 or 2 elements are now stored in the
list value itself. In particular, this makes the "concatMap (x: if
cond then [(f x)] else [])" idiom cheaper.
|
|
These are used thousands of times during NixOS evaluation, so it's
useful to speed them up.
|
|
|
|
|
|
|
|
This ensures that 1) the derivation doesn't change when Nix changes;
2) the derivation closure doesn't contain Nix and its dependencies; 3)
we don't have to rely on ugly chroot hacks.
|
|
|
|
Fixes #572.
|
|
This modification moves Attr and Bindings structures into their own header
file which is dedicated to the attribute set representation. The goal of to
isolate pieces of code which are related to the attribute set
representation. Thus future modifications of the attribute set
representation will only have to modify these files, and not every other
file across the evaluator.
|
|
|
|
|
|
This didn't work (despite claims in the manual), because the colon in
"http://" was parsed as a element separator. So handle "://"
specially.
|
|
|
|
|
|
|
|
|
|
This relaxes restricted mode to allow access to anything in the
store. In the future, it would be better to allow access to only paths
that have been constructed in the current evaluation (so a hard-coded
/nix/store/blabla in a Nix expression would still be
rejected). However, note that reading /nix/store itself is still
rejected, so you can't use this so get access to things you don't know
about.
|
|
For instance, you can install Firefox from a specific Nixpkgs revision
like this:
$ nix-env -f https://github.com/NixOS/nixpkgs/archive/63def04891a0abc328b1b0b3a78ec02c58f48583.tar.gz -iA firefox
Or build a package from the latest nixpkgs-unstable channel:
$ nix-build https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz -A hello
|
|
E.g. to install "hello" from the latest Nixpkgs:
$ nix-build '<nixpkgs>' -A hello -I nixpkgs=https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz
Or to install a specific version of NixOS:
$ nixos-rebuild switch -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/63def04891a0abc328b1b0b3a78ec02c58f48583.tar.gz
|
|
|
|
|
|
|
|
|
|
This is because we don't want to do HTTP requests on every evaluation,
even though we can prevent a full redownload via the cached ETag. The
default is one hour.
|