about summary refs log tree commit diff
path: root/src/nix-instantiate
AgeCommit message (Collapse)AuthorFilesLines
2018-02-08 Add plugins to make Nix more extensible.Shea Levy1-0/+2
All plugins in plugin-files will be dlopened, allowing them to statically construct instances of the various Register* types Nix supports.
2018-01-16 Add pure evaluation modeEelco Dolstra1-1/+1
In this mode, the following restrictions apply: * The builtins currentTime, currentSystem and storePath throw an error. * $NIX_PATH and -I are ignored. * fetchGit and fetchMercurial require a revision hash. * fetchurl and fetchTarball require a sha256 attribute. * No file system access is allowed outside of the paths returned by fetch{Git,Mercurial,url,Tarball}. Thus 'nix build -f ./foo.nix' is not allowed. Thus, the evaluation result is completely reproducible from the command line arguments. E.g. nix build --pure-eval '( let nix = fetchGit { url = https://github.com/NixOS/nixpkgs.git; rev = "9c927de4b179a6dd210dd88d34bda8af4b575680"; }; nixpkgs = fetchGit { url = https://github.com/NixOS/nixpkgs.git; ref = "release-17.09"; rev = "66b4de79e3841530e6d9c6baf98702aa1f7124e4"; }; in (import (nix + "/release.nix") { inherit nix nixpkgs; }).build.x86_64-linux )' The goal is to enable completely reproducible and traceable evaluation. For example, a NixOS configuration could be fully described by a single Git commit hash. 'nixos-rebuild' would do something like nix build --pure-eval '( (import (fetchGit { url = file:///my-nixos-config; rev = "..."; })).system ') where the Git repository /my-nixos-config would use further fetchGit calls or Git externals to fetch Nixpkgs and whatever other dependencies it has. Either way, the commit hash would uniquely identify the NixOS configuration and allow it to reproduced.
2017-10-24 nix: Respect -I, --arg, --argstrEelco Dolstra1-10/+12
Also, random cleanup to argument handling.
2017-07-30 Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim1-2/+2
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-07-26 nix-build/nix-shell: Eliminate call to nix-instantiate / nix-storeEelco Dolstra1-9/+2
Note that this removes the need for a derivation symlink, so the --drv-path and --add-drv-link flags now do nothing.
2017-07-03 Replace a few bool flags with enumsEelco Dolstra1-2/+2
Functions like copyClosure() had 3 bool arguments, which creates a severe risk of mixing up arguments. Also, implement copyClosure() using copyPaths().
2017-05-16 Improve progress indicatorEelco Dolstra1-1/+1
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra1-2/+2
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux1-2/+2
2016-06-02 Allow setting the state directory as a store parameterEelco Dolstra1-1/+3
E.g. "local?store=/tmp/store&state=/tmp/var".
2016-04-25 Improved logging abstractionEelco Dolstra1-1/+1
This also gets rid of --log-type, since the nested log type isn't useful in a multi-threaded situation, and nobody cares about the "pretty" log type.
2016-02-11 Move addPermRoot into StoreEelco Dolstra1-4/+4
2016-02-04 StoreAPI -> StoreEelco Dolstra1-1/+1
Calling a class an API is a bit redundant...
2016-02-04 Eliminate the "store" global variableEelco Dolstra1-7/+6
Also, move a few free-standing functions into StoreAPI and Derivation. Also, introduce a non-nullable smart pointer, ref<T>, which is just a wrapper around std::shared_ptr ensuring that the pointer is never null. (For reference-counted values, this is better than passing a "T&", because the latter doesn't maintain the refcount. Usually, the caller will have a shared_ptr keeping the value alive, but that's not always the case, e.g., when passing a reference to a std::thread via std::bind.)
2015-10-29 int2String() -> std::to_string()Eelco Dolstra1-1/+1
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>
2014-02-01 Remove AutomakefilesEelco Dolstra1-10/+0
2014-02-01 Update Makefile variable namesEelco Dolstra1-1/+1
2014-01-30 Rename Makefile -> local.mkEelco Dolstra1-0/+0
2014-01-09 Update MakefilesEelco Dolstra1-1/+1
2013-11-25 Rename Makefile.new -> MakefileEelco Dolstra1-0/+0
2013-11-22 Rename $(here) to $(d) for brevity, and remove trailing slashEelco Dolstra1-1/+1
2013-11-22 New non-recursive, plain Make-based build systemEelco Dolstra1-0/+7
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 Dolstra3-39/+2
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).