- Dec 11, 2014
-
-
darealshinji authored
-
Eelco Dolstra authored
-
- Dec 10, 2014
-
-
Eelco Dolstra authored
Borrowed from systemd.
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
This prevents having to fetch Nixpkgs or cacert over http.
-
Eelco Dolstra authored
The pid field can be -1 if forking the substituter process failed.
-
Eelco Dolstra authored
This reverts commit d34d2b2b.
-
roconnor authored
-
Shea Levy authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
- Dec 09, 2014
-
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
- Dec 08, 2014
-
- Dec 05, 2014
-
-
Eelco Dolstra authored
-
Eelco Dolstra authored
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...)
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
- Dec 02, 2014
-
-
Eelco Dolstra authored
Allow external code using libnixexpr to add types
-
Shea Levy authored
-
Shea Levy authored
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.
-
- Nov 25, 2014
-
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
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 ./.)
-
Eelco Dolstra authored
-
- Nov 24, 2014
-
-
Eelco Dolstra authored
-
Eelco Dolstra authored
Derivations are now built in order of derivation name, so a package named "aardvark" is built before "baboon". Fixes #399.
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Rob Vermaas authored
-
- Nov 21, 2014
-
-
Shea Levy authored
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.
-