Age | Commit message (Collapse) | Author | Files | Lines |
|
In low memory environments, "nix-env -qa" failed because the fork to
run the pager hit the kernel's overcommit limits. Using posix_spawn
gets around this. (Actually, you have to use posix_spawn with the
undocumented POSIX_SPAWN_USEVFORK flag, otherwise it just uses
fork/exec...)
|
|
|
|
|
|
Allow external code using libnixexpr to add types
|
|
|
|
Code that links to libnixexpr (e.g. plugins loaded with importNative, or
nix-exec) may want to provide custom value types and operations on
values of those types. For example, nix-exec is currently using sets
where a custom IO value type would be more appropriate. This commit
provides a generic hook for such types in the form of tExternal and the
ExternalBase virtual class, which contains all functions necessary for
libnixexpr's type-polymorphic functions (e.g. `showType`) to be
implemented.
|
|
|
|
|
|
The function ‘builtins.match’ takes a POSIX extended regular
expression and an arbitrary string. It returns ‘null’ if the string
does not match the regular expression. Otherwise, it returns a list
containing substring matches corresponding to parenthesis groups in
the regex. The regex must match the entire string (i.e. there is an
implied "^<pat>$" around the regex). For example:
match "foo" "foobar" => null
match "foo" "foo" => []
match "f(o+)(.*)" "foooobar" => ["oooo" "bar"]
match "(.*/)?([^/]*)" "/dir/file.nix" => ["/dir/" "file.nix"]
match "(.*/)?([^/]*)" "file.nix" => [null "file.nix"]
The following example finds all regular files with extension .nix or
.patch underneath the current directory:
let
findFiles = pat: dir: concatLists (mapAttrsToList (name: type:
if type == "directory" then
findFiles pat (dir + "/" + name)
else if type == "regular" && match pat name != null then
[(dir + "/" + name)]
else []) (readDir dir));
in findFiles ".*\\.(nix|patch)" (toString ./.)
|
|
|
|
|
|
Derivations are now built in order of derivation name, so a package
named "aardvark" is built before "baboon".
Fixes #399.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Before this there was a bug where a `find` was being called on a
not-yet-sorted set. The code was just a mess before anyway, so I cleaned
it up while fixing it.
|
|
They're not so important anymore now that Hydra has jobset scheduling.
|
|
Spotted by Perl 5.20:
Possible precedence issue with control flow operator at /usr/lib/perl5/site_perl/5.20.1/x86_64-linux-gnu-thread-multi/Nix/Utils.pm line 46.
|
|
Fixes #397.
|
|
Especially in WAL mode on a highly loaded machine, this is not a good
idea because it results in a WAL file of approximately the same size
ad the database, which apparently cannot be deleted while anybody is
accessing it.
|
|
This was preventing destructors from running. In particular, it was
preventing the deletion of the temproot file for each worker
process. It may also have been responsible for the excessive WAL
growth on Hydra (due to the SQLite database not being closed
properly).
Apparently broken by accident in
8e9140cfdef9dbd1eb61e4c75c91d452ab5e4a74.
|
|
|
|
|
|
|
|
|
|
Avoids an assertion
|
|
|
|
With this, attribute sets with a `__functor` attribute can be applied
just like normal functions. This can be used to attach arbitrary
metadata to a function without callers needing to treat it specially.
|
|
This gives 32-bit builds on x86_64-linux more memory.
|
|
This allows hydra-build to keep track of the actual build time (so
excluding time required to copy closures around).
|
|
|
|
"got EOF while expecting 8 bytes from remote side" is not very
helpful.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This makes allowed-users and trusted-users work on Mac OS X.
|
|
|
|
darwin is borked"""
This reverts commit a51f8d67473953307ef7fd0ea033a81fb022289f.
|
|
|
|
|
|
|
|
borked""
This reverts commit f72944b42f7504ed73129395a2636d3a4ecabf4e.
|
|
This reverts commit 29f7e142fc5d01fd2703c70442dc06fd98ce9595.
|