about summary refs log tree commit diff
path: root/src/nix-instantiate/nix-instantiate.cc
AgeCommit message (Collapse)AuthorFilesLines
2015-07-17 OCD: foreach -> C++11 ranged forEelco Dolstra1-8/+8
2015-05-06 nix-env/nix-instantiate/nix-build: Support URIsEelco Dolstra1-3/+3
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
2015-05-05 Allow URLs in the Nix search pathEelco Dolstra1-5/+5
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
2015-03-19 Fix Boehm API violationEelco Dolstra1-0/+1
We were calling GC_INIT() after doing an allocation (in the baseEnv construction), which is not allowed.
2014-12-12 Remove canary stuffEelco Dolstra1-2/+0
2014-09-22 Rename strictForceValue -> forceValueDeepEelco Dolstra1-1/+1
2014-09-19 Store Attrs inside BindingsEelco Dolstra1-2/+1
This prevents a double allocation per attribute set.
2014-09-17 Add some instrumentation for debugging GC leaksEelco Dolstra1-0/+2
2014-08-20 Use proper quotes everywhereEelco Dolstra1-2/+2
2014-08-13 Refactor option handlingEelco Dolstra1-106/+96
2014-06-27 Style fixEelco Dolstra1-11/+8
2014-06-27 Add `--json` argument to `nix-instantiate`Paul Colomiets1-6/+17
2014-05-26 Ensure that -I flags get included in nixPathEelco Dolstra1-3/+11
Also fixes #261.
2014-05-13 nix-instantiate --eval: Apply auto-arguments if the result is a functionEelco Dolstra1-5/+10
Fixes #254.
2014-02-19 nix-instantiate: Allow --dry-run as a synonym for --readonly-modeEelco Dolstra1-0/+2
--dry-run is more consistent with nix-env and nix-store.
2014-02-19 nix-instantiate: Rename --eval-only to --eval, --parse-only to --parseEelco Dolstra1-2/+2
2014-02-19 nix-instantiate: Add a flag --expr / -E to read expressions from the command ↵Eelco Dolstra1-2/+7
line This is basically a shortcut for ‘echo 'expr...' | nix-instantiate -’. Also supported by nix-build and nix-shell.
2014-02-07 nix-instantiate --eval-only --read-write-mode: Don't depend on orderingShea Levy1-9/+8
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-07 Rename --no-readonly-mode --read-write-modeShea Levy1-1/+1
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-07 nix-instantiate: Add a --no-readonly-mode flagShea Levy1-0/+3
This allows running nix-instantiate --eval-only without performing the evaluation in readonly mode, letting features like import from derivation and automatic substitution of builtins.storePath paths work. Signed-off-by: Shea Levy <shea@shealevy.com>
2013-11-19 Generalise meta attributesEelco Dolstra1-2/+2
2013-09-03 Work on Values instead of ExprsEelco Dolstra1-2/+4
This prevents some duplicate evaluation in nix-env and nix-instantiate. Also, when traversing ~/.nix-defexpr, only read regular files with the extension .nix. Previously it was reading files like .../channels/binary-caches/<name>. The only reason this didn't cause problems is pure luck (namely, <name> shadows an actual Nix expression, the binary-caches files happen to be syntactically valid Nix expressions, and we iterate over the directory contents in just the right order).
2013-09-03 ReformatEelco Dolstra1-33/+35
2013-09-03 Get rid of the parse tree cacheEelco Dolstra1-1/+1
Since we already cache files in normal form (fileEvalCache), caching parse trees is redundant. Note that getting rid of this cache doesn't actually save much memory at the moment, because parse trees are currently not freed / GC'ed.
2012-11-26 nix-instantiate: Fix read-only evaluationEelco Dolstra1-9/+2
2012-11-26 Make "nix-build -A <derivation>.<output>" do the right thingEelco Dolstra1-1/+15
For example, given a derivation with outputs "out", "man" and "bin": $ nix-build -A pkg produces ./result pointing to the "out" output; $ nix-build -A pkg.man produces ./result-man pointing to the "man" output; $ nix-build -A pkg.all produces ./result, ./result-man and ./result-bin; $ nix-build -A pkg.all -A pkg2 produces ./result, ./result-man, ./result-bin and ./result-2.
2012-10-04 getDerivation(): Don't always quietly ignore assertion failureEelco Dolstra1-1/+1
Ignoring assertion failures makes some sense for nix-env -qa, but not for nix-instantiate/nix-build or hydra-eval-jobs.
2012-10-03 When ‘--help’ is given, just run ‘man’ to show the manual pageEelco Dolstra1-2/+1
I.e. do what git does. I'm too lazy to keep the builtin help text up to date :-) Also add ‘--help’ to various commands that lacked it (e.g. nix-collect-garbage).
2012-10-03 Add a ‘--repair’ flag to nix-instantiateEelco Dolstra1-0/+2
This allows repairing corrupted derivations and other source files.
2012-08-28 Make "nix-instantiate -" interruptibleEelco Dolstra1-3/+1
2012-08-27 Merge branch 'master' into no-manifestsEelco Dolstra1-3/+5
2012-08-24 Include the output name in the GC root linkEelco Dolstra1-3/+5
Output names are now appended to resulting GC symlinks, e.g. by nix-build. For backwards compatibility, if the output is named "out", nothing is appended. E.g. doing "nix-build -A foo" on a derivation that produces outputs "out", "bin" and "dev" will produce symlinks "./result", "./result-bin" and "./result-dev", respectively.
2012-07-30 Refactor settings processingEelco Dolstra1-2/+2
Put all Nix configuration flags in a Settings object.
2012-04-17 nix-instantiate: default to "default.nix" if no arguments are givenEelco Dolstra1-1/+2
2012-04-17 Added utility command ‘nix-instantiate --find-file’ to look up a file in ↵Eelco Dolstra1-0/+12
Nix's search path
2012-02-04 * Inline some functions and get rid of the indirection throughEelco Dolstra1-0/+1
EvalState::eval(). This gives a 12% speedup on ‘nix-instantiate /etc/nixos/nixos/ -A system --readonly-mode’ (from 1.01s to 0.89s).
2011-12-01 * Allow '<nixexpr>' syntax to be used in nix-instantiate, nix-buildEelco Dolstra1-2/+1
and nix-env, e.g., $ nix-env -f '<nixpkgs>' -i patchelf or $ nix-build '<nixos/tests>' -A login.test
2011-08-31 * Eliminate all uses of the global variable ‘store’ from libstore.Eelco Dolstra1-3/+2
This should also fix: nix-instantiate: ./../boost/shared_ptr.hpp:254: T* boost::shared_ptr<T>::operator->() const [with T = nix::StoreAPI]: Assertion `px != 0' failed. which was caused by hashDerivationModulo() calling the ‘store’ object (during store upgrades) before openStore() assigned it.
2011-08-06 * Add a Nix expression search path feature. Paths between angleEelco Dolstra1-0/+2
brackets, e.g. import <nixpkgs/pkgs/lib> are resolved by looking them up relative to the elements listed in the search path. This allows us to get rid of hacks like import "${builtins.getEnv "NIXPKGS_ALL"}/pkgs/lib" The search path can be specified through the ‘-I’ command-line flag and through the colon-separated ‘NIX_PATH’ environment variable, e.g., $ nix-build -I /etc/nixos ... If a file is not found in the search path, an error message is lazily thrown.
2011-08-06 * Refactoring: move parseExprFromFile() and parseExprFromString() intoEelco Dolstra1-3/+2
the EvalState class.
2010-11-16 * Sync with the trunk.Eelco Dolstra1-4/+4
2010-10-22 * Store Value nodes outside of attribute sets. I.e., Attr now storesEelco Dolstra1-1/+1
a pointer to a Value, rather than the Value directly. This improves the effectiveness of garbage collection a lot: if the Value is stored inside the set directly, then any live pointer to the Value causes all other attributes in the set to be live as well.
2010-10-04 * Make sure that config.h is included before the system headers,Eelco Dolstra1-3/+3
because it defines _FILE_OFFSET_BITS. Without this, on OpenSolaris the system headers define it to be 32, and then the 32-bit stat() ends up being called with a 64-bit "struct stat", or vice versa. This also ensures that we get 64-bit file sizes everywhere. * Remove the redundant call to stat() in parseExprFromFile(). The file cannot be a symlink because that's the exit condition of the loop before.
2010-05-12 * Sync with the trunk.Eelco Dolstra1-52/+41
2010-05-07 * Sync with the trunk.Eelco Dolstra1-4/+7
2010-04-20 * Sync with the trunk.Eelco Dolstra1-6/+9
2010-04-13 * Use a symbol table to represent identifiers and attribute namesEelco Dolstra1-2/+2
efficiently. The symbol table ensures that there is only one copy of each symbol, thus allowing symbols to be compared efficiently using a pointer equality test.
2010-04-12 * Indented strings.Eelco Dolstra1-1/+1
2010-04-12 * Don't use ATerms for the abstract syntax trees anymore. NotEelco Dolstra1-5/+5
finished yet.
2010-04-08 * Remove a lot of dead code.Eelco Dolstra1-1/+1