about summary refs log tree commit diff
path: root/src/nix-env/nix-env.cc
AgeCommit message (Collapse)AuthorFilesLines
2013-09-06 Remove stray debug lineEelco Dolstra1-2/+0
2013-09-03 nix-env -i: Add a flag ‘--remove-all’ / ‘-r’Eelco Dolstra1-17/+25
This is equivalent to running ‘nix-env -e '*'’ first, except that it happens in a single transaction. Thus, ‘nix-env -i pkgs...’ replaces the profile with the specified set of packages. The main motivation is to support declarative package management (similar to environment.systemPackages in NixOS). That is, if you have a specification ‘profile.nix’ like this: with import <nixpkgs> {}; [ thunderbird geeqie ... ] then after any change to ‘profile.nix’, you can run: $ nix-env -f profile.nix -ir to update the profile to match the specification. (Without the ‘-r’ flag, if you remove a package from ‘profile.nix’, it won't be removed from the actual profile.) Suggested by @zefhemel.
2013-09-03 nix-env: Use wildcard match by defaultEelco Dolstra1-8/+4
That is, you don't need to pass '*' anymore, so nix-env -qa is equivalent to nix-env -qa '*'
2013-09-03 nix-env: Load files in ~/.nix-defexpr on demandEelco Dolstra1-3/+6
So if you do "nix-env -qa -A nixos", then other channels won't be parsed/evaluated at all.
2013-09-03 Check for name collisions in the input Nix expressionsEelco Dolstra1-3/+9
2013-09-03 Work on Values instead of ExprsEelco Dolstra1-29/+38
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 Get rid of the parse tree cacheEelco Dolstra1-2/+2
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.
2013-08-26 Fix typos, especially those that end up in the Nix manualIvan Kozik1-1/+1
2012-12-12 Allow setting the profile location using $NIX_PROFILEEelco Dolstra1-0/+3
Fixes #69.
2012-12-03 Fix the ‘--prebuilt-only’ flagEelco Dolstra1-8/+11
2012-12-03 WhitespaceEelco Dolstra1-46/+46
2012-11-28 nix-env -q --out-path: Support multiple outputsEelco Dolstra1-33/+46
We now print all output paths of a package, e.g. openssl-1.0.0i bin=/nix/store/gq2mvh0wb9l90djvsagln3aqywqmr6vl-openssl-1.0.0i-bin;man=/nix/store/7zwf5r5hsdarl3n86dasvb4chm2xzw9n-openssl-1.0.0i-man;/nix/store/cj7xvk7fjp9q887359j75pw3pzjfmqf1-openssl-1.0.0i or (in XML mode) <item attrPath="openssl" name="openssl-1.0.0i" system="x86_64-linux"> <output name="bin" path="/nix/store/gq2mvh0wb9l90djvsagln3aqywqmr6vl-openssl-1.0.0i-bin" /> <output name="man" path="/nix/store/7zwf5r5hsdarl3n86dasvb4chm2xzw9n-openssl-1.0.0i-man" /> <output name="out" path="/nix/store/cj7xvk7fjp9q887359j75pw3pzjfmqf1-openssl-1.0.0i" /> </item>
2012-10-04 getDerivation(): Don't always quietly ignore assertion failureEelco Dolstra1-3/+3
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 nix-env: Support ‘--repair’ flagEelco Dolstra1-1/+3
2012-09-13 nix-env --delete-generations: Support --dry-run flagEelco Dolstra1-5/+10
Fixes #43.
2012-08-01 nix-env: Ignore manifest.nix when recursing into ~/.nix-defexprEelco Dolstra1-0/+5
Channels are implemented using a profile now, and profiles contain a manifest.nix file. This should be ignored to prevent bogus packages from showing up in nix-env.
2012-07-30 Refactor settings processingEelco Dolstra1-12/+8
Put all Nix configuration flags in a Settings object.
2012-07-11 Replace hasSubstitutes() with querySubstitutablePaths()Eelco Dolstra1-4/+6
querySubstitutablePaths() takes a set of paths, so this greatly reduces daemon <-> client latency.
2012-07-11 Add a function queryValidPaths()Eelco Dolstra1-3/+6
queryValidPaths() combines multiple calls to isValidPath() in one. This matters when using the Nix daemon because it reduces latency. For instance, on "nix-env -qas \*" it reduces execution time from 5.7s to 4.7s (which is indistinguishable from the non-daemon case).
2012-07-11 nix-env: Determine which paths have substitutes in parallelEelco Dolstra1-1/+18
2012-06-27 nix-store -r: do substitutions in parallelEelco Dolstra1-1/+1
I.e. when multiple non-derivation arguments are passed to ‘nix-store -r’ to be substituted, do them in parallel.
2011-12-01 * Allow '<nixexpr>' syntax to be used in nix-instantiate, nix-buildEelco Dolstra1-1/+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-4/+4
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-4/+3
the EvalState class.
2011-04-11 * `nix-env -ub' (`--prebuilt-only') didn't really work because itEelco Dolstra1-17/+20
checked too soon whether substitutes are available. That is, it did so for every available package, rather than those matching installed packages. This was very slow and subject to assertion failures. So do the check much later. Idem for `nix-env -qab' and `nix-env -ib'.
2010-11-16 * Sync with the trunk.Eelco Dolstra1-4/+4
2010-10-24 * Keep attribute sets in sorted order to speed up attribute lookups.Eelco Dolstra1-2/+2
* Simplify the representation of attributes in the AST. * Change the behaviour of listToAttrs() in case of duplicate names.
2010-10-22 * Store Value nodes outside of attribute sets. I.e., Attr now storesEelco Dolstra1-2/+2
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 * Sync with the trunk.Eelco Dolstra1-1/+0
2010-09-14 * Doh. Remove debug message.Eelco Dolstra1-1/+0
2010-08-04 * Sync with the trunk.Eelco Dolstra1-7/+13
2010-08-04 * Set the default system filter to "*". This ensures that (forEelco Dolstra1-7/+13
instance) "nix-env -i wine" works on x86_64-linux, even though Wine is built on i686-linux. In the event that there are multiple matching derivations, prefer those built for the current system.
2010-05-12 * Sync with the trunk.Eelco Dolstra1-197/+31
2010-05-06 * Store attribute positions in the AST and report duplicate attributeEelco Dolstra1-2/+3
errors with position info. * For all positions, use the position of the first character of the first token, rather than the last character of the first token plus one.
2010-04-21 * Store user environment manifests as a Nix expression inEelco Dolstra1-136/+0
$out/manifest.nix rather than as an ATerm. (Hm, I thought I committed this two days ago...)
2010-04-19 * Refactoring: move the user environment stuff into its own module.Eelco Dolstra1-19/+1
2010-04-16 * _combineChannels shouldn't be an integer.Eelco Dolstra1-1/+1
2010-04-16 * In an nested `with' where the inner with is a variable (`with ...;Eelco Dolstra1-0/+1
with someVar; ...'), the contents of the variable would be clobbered. (The attributes in the outer `with' were added to the variable.)
2010-04-14 * Get nix-env to compile again.Eelco Dolstra1-29/+14
2010-04-12 * Don't use ATerms for the abstract syntax trees anymore. NotEelco Dolstra1-3/+2
finished yet.
2010-04-07 * Update autoCallFunction() and findAlongAttrPath().Eelco Dolstra1-13/+9
2010-03-31 * Get nix-env to compile.Eelco Dolstra1-12/+19
2010-03-02 * When using the included sqlite/aterm libraries, build withEelco Dolstra1-0/+1
--enable-shared. * In libutil/libstore/libexpr etc., link against sqlite and aterm. * Some more header file hygiene.
2010-02-24 * `helpText' is now zero-terminated.Eelco Dolstra1-1/+1
2009-10-13 * Give a useful error message when an evaluation error occurs whileEelco Dolstra1-41/+48
trying to upgrade a package.
2009-07-02 * Replace newlines in table output with spaces.Eelco Dolstra1-6/+7
2009-06-30 * Support integers and lists of strings in meta fields. This isEelco Dolstra1-28/+60
useful for fields like meta.maintainers, meta.priority (which can be a proper integer now) and even meta.license (if there are multiple licenses).
2008-09-18 * Fix `--from-profile'.Eelco Dolstra1-3/+5