Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2015-03-06 | forceValueDeep: Add to error prefix | Eelco Dolstra | 1 | -2/+7 | |
2015-03-06 | Improve error message | Eelco Dolstra | 2 | -19/+25 | |
2015-02-23 | Add restricted evaluation mode | Eelco Dolstra | 5 | -11/+50 | |
If ‘--option restrict-eval true’ is given, the evaluator will throw an exception if an attempt is made to access any file outside of the Nix search path. This is primarily intended for Hydra, where we don't want people doing ‘builtins.readFile ~/.ssh/id_dsa’ or stuff like that. | |||||
2015-02-19 | Merge branch 'tilde-paths' of https://github.com/shlevy/nix | Eelco Dolstra | 3 | -2/+6 | |
2015-02-19 | tilde paths: The rest of the string has to start with a slash anyway | Shea Levy | 1 | -1/+1 | |
2015-02-19 | tilde paths: construct the entire path at parse time | Shea Levy | 1 | -6/+1 | |
2015-02-19 | tilde paths: get HOME at parse time | Shea Levy | 1 | -3/+1 | |
2015-02-19 | Remove obsolete reference to ~ operator | Eelco Dolstra | 1 | -1/+0 | |
2015-02-19 | ExprConcatStrings: canonicalize concatenated paths | Shea Levy | 1 | -1/+2 | |
2015-02-19 | Allow the leading component of a path to be a ~ | Shea Levy | 2 | -1/+11 | |
2015-02-05 | Remove tab | Eelco Dolstra | 1 | -1/+1 | |
2015-01-29 | Merge remote-tracking branch 'shlevy/baseNameOf-no-copy' | Shea Levy | 1 | -1/+1 | |
baseNameOf: Don't copy paths to the store first | |||||
2015-01-15 | Fix assertion failure in nix-env | Eelco Dolstra | 1 | -3/+5 | |
$ nix-env -f ~/Dev/nixops/ -iA foo nix-env: src/libexpr/eval.hh:57: void nix::Bindings::push_back(const nix::Attr&): Assertion `size_ < capacity' failed. Aborted | |||||
2015-01-09 | Fix builtins.readDir on XFS | Eelco Dolstra | 1 | -1/+1 | |
The DT_UNKNOWN fallback code was getting the type of the wrong path, causing readDir to report "directory" as the type of every file. Reported by deepfire on IRC. | |||||
2015-01-07 | Show position info for failing <...> lookups | Eelco Dolstra | 3 | -4/+8 | |
2015-01-07 | Remove quotes around filenames in position info | Eelco Dolstra | 1 | -1/+1 | |
2014-12-14 | Pedantry | Eelco Dolstra | 1 | -4/+0 | |
2014-12-12 | Remove canary stuff | Eelco Dolstra | 3 | -56/+0 | |
2014-12-10 | builtins.readFile: realise context associated with the path | Shea Levy | 1 | -2/+6 | |
2014-12-02 | Make all ExternalValueBase functions const | Shea Levy | 4 | -15/+15 | |
2014-12-02 | Allow external code using libnixexpr to add types | Shea Levy | 5 | -0/+108 | |
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. | |||||
2014-11-25 | Add a primop for regular expression pattern matching | Eelco Dolstra | 1 | -1/+29 | |
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 ./.) | |||||
2014-11-25 | forceString(): Accept pos argument | Eelco Dolstra | 3 | -5/+5 | |
2014-11-20 | import derivation: cleanup | Shea Levy | 1 | -8/+11 | |
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. | |||||
2014-11-15 | realiseContext: Handle all context types | Shea Levy | 1 | -2/+2 | |
Avoids an assertion | |||||
2014-11-15 | Add functors (callable attribute sets). | Shea Levy | 2 | -1/+13 | |
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. | |||||
2014-10-31 | Fix more warnings | Eelco Dolstra | 1 | -11/+1 | |
2014-10-20 | Fix build on gcc < 4.7 | Shea Levy | 1 | -0/+3 | |
2014-10-20 | Improve printing of ASTs | Eelco Dolstra | 3 | -16/+58 | |
2014-10-18 | baseNameOf: Don't copy paths to the store first | Shea Levy | 1 | -1/+1 | |
2014-10-17 | Export realiseContext in libnixexpr | Shea Levy | 2 | -9/+11 | |
Useful for importNative plugins | |||||
2014-10-09 | mkList: Scrub better | Eelco Dolstra | 2 | -2/+3 | |
Clearing v.app.right was not enough, because the length field of a list only takes 32 bits, so the most significant 32 bits of v.app.left (a.k.a. v.thunk.env) would remain. This could cause Boehm GC to interpret it as a valid pointer. This change reduces maximum RSS for evaluating the ‘tested’ job in nixos/release-small.nix from 1.33 GiB to 0.80 GiB, and runtime by about 8%. | |||||
2014-10-09 | Typo | Eelco Dolstra | 1 | -1/+1 | |
2014-10-05 | Get rid of some unnecessary ExprConcatStrings nodes in dynamic attrs | Eelco Dolstra | 3 | -25/+18 | |
This gives a ~18% speedup in NixOS evaluation (after converting most calls to hasAttr/getAttr to dynamic attrs). | |||||
2014-10-05 | Show total allocations | Eelco Dolstra | 1 | -8/+10 | |
2014-10-04 | Add primop ‘catAttrs’ | Eelco Dolstra | 1 | -0/+30 | |
2014-10-04 | Add primop ‘attrValues’ | Eelco Dolstra | 1 | -1/+23 | |
2014-10-04 | Tweak | Eelco Dolstra | 1 | -1/+1 | |
2014-10-03 | Remove some duplicate code | Eelco Dolstra | 1 | -15/+8 | |
2014-10-03 | Add readDir primop | Shea Levy | 1 | -0/+37 | |
2014-10-03 | Don't recompile the same regex over and over | Eelco Dolstra | 2 | -3/+8 | |
2014-10-03 | nix-env: Add regular expression support in selectors | Eelco Dolstra | 1 | -1/+5 | |
So you can now do things like: $ nix-env -qa '.*zip.*' $ nix-env -qa '.*(firefox|chromium).*' | |||||
2014-10-01 | printValue(): Don't print <CYCLE> for repeated values | Eelco Dolstra | 1 | -7/+9 | |
2014-09-30 | Support control characters in JSON output | Eelco Dolstra | 2 | -0/+8 | |
2014-09-24 | Bindings: Remove copy constructor | Eelco Dolstra | 1 | -2/+3 | |
2014-09-23 | Add missing static | Eelco Dolstra | 1 | -2/+2 | |
2014-09-22 | Don't evaluate inside a "throw" | Eelco Dolstra | 1 | -3/+4 | |
Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41174. This caused hydra-eval-jobs to ignore SIGINT. | |||||
2014-09-22 | Add ‘deepSeq’ primop | Eelco Dolstra | 1 | -0/+11 | |
Note that unlike ‘lib.deepSeq’ in Nixpkgs, this handles cycles. | |||||
2014-09-22 | Make forceValueDeep work on values with cycles | Eelco Dolstra | 1 | -9/+20 | |
2014-09-22 | Rename strictForceValue -> forceValueDeep | Eelco Dolstra | 2 | -4/+4 | |