about summary refs log tree commit diff
path: root/src/nix-env
AgeCommit message (Collapse)AuthorFilesLines
2006-02-08 * Oops, fix breakage.Eelco Dolstra1-0/+2
2006-02-08 * Refactoring: move derivation evaluation to libexpr.Eelco Dolstra1-186/+76
2006-02-01 * The "S" bit should be based on the output path, not the derivation path.Eelco Dolstra1-1/+1
2006-01-26 * Oops, the "I" bit in "nix-env -qas" was broken. Reported by Nicolae Vintila.Eelco Dolstra1-1/+1
2005-12-24 * Documentation fixes.Eelco Dolstra1-2/+2
2005-10-06 * Swap the system and version comparion columns.Eelco Dolstra1-2/+2
2005-10-06 * Only colorise if we are attached to a terminal.Eelco Dolstra1-0/+3
2005-10-06 * New query option: `--compare-versions' or `-c' to compare installedEelco Dolstra2-19/+89
versions to available versions, or vice versa. For example, the following compares installed versions to available versions: $ nix-env -qc autoconf-2.59 = 2.59 automake-1.9.4 < 1.9.6 f-spot-0.0.10 - ? firefox-1.0.4 < 1.0.7 ... I.e., there are newer versions available (in the current default Nix expression) for Automake and Firefox, but not for Autoconf, and F-Spot is missing altogether. Conversely, the available versions can be compared to the installed versions: $ nix-env -qac autoconf-2.59 = 2.59 automake-1.9.6 > 1.9.4 bash-3.0 - ? firefox-1.0.7 > 1.0.4 ... Note that bash is available but no version of it is installed. If multiple versions are available for comparison, then the highest is used. E.g., if Subversion 1.2.0 is installed, and Subversion 1.1.4 and 1.2.3 are available, then `nix-env -qc' will print `< 1.2.3', not `> 1.1.4'. If higher versions are available, the version column is printed in red (using ANSI escape codes).
2005-09-01 * `nix-env -e' corrupts memory due to incorrect use of iterators.Eelco Dolstra1-2/+6
Reported by Rob Vermaas.
2005-07-22 * Build dynamic libraries.Eelco Dolstra1-3/+3
2005-05-09 * Handle store path arguments in `nix-env -i' correctly again.Eelco Dolstra1-9/+30
2005-05-08 * Lazily compute the derivation and output paths of derivations. ThisEelco Dolstra1-40/+63
makes most query and installation operations much faster (e.g., `nix-env -qa' on the current Nixpkgs is about 10 times faster).
2005-05-04 * Include some required header files.Eelco Dolstra2-1/+3
2005-02-17 * Compatibility hack with older user environments.Eelco Dolstra1-1/+3
2005-02-15 * Compatibility with older GCCs.Eelco Dolstra1-5/+15
2005-02-15 * And yet another installation source: the ability to copy userEelco Dolstra1-34/+46
environment elements from one user environment to another, e.g., $ nix-env -i --from-profile /nix/var/nix/profiles/other-profile aterm copies the `aterm' component installed in the `other-profile' to the user's current profile.
2005-02-14 * It is now possible to add store derivations or paths directly to aEelco Dolstra1-1/+38
user environment, e.g., $ nix-env -i /nix/store/z58v41v21xd3ywrqk1vmvdwlagjx7f10-aterm-2.3.1.drv or $ nix-env -i /nix/store/hsyj5pbn0d9iz7q0aj0fga7cpaadvp1l-aterm-2.3.1 This is useful because it allows Nix expressions to be bypassed entirely. For instance, if only a nix-pull manifest is provided, plus the top-level path of some component, it can be installed without having to supply the Nix expression (e.g., for obfuscation, or to be independent of Nix expression language changes or context dependencies).
2005-02-14 * Added an installation source `--from-expression' (or `-E') toEelco Dolstra1-8/+22
install derivations from a Nix expression specified on the command line. This is particularly useful for disambiguation if there are multiple derivations with the same name. For instance, in Nixpkgs, to install the Firefox wrapper rather than the plain Firefox component: $ nix-env -f .../i686-linux.nix -i -E 'x: x.firefoxWrapper' The Nix expressions should be functions to which the default Nix expression (in this case, `i686-linux.nix') is passed, hence `x: ...'. This might also be a nice way to deal with high-level (user-level) variability, e.g., $ nix-env -f ./server.nix -i -E 'x: x {port = 8080; ssl = false;}'
2005-02-14 * Refactoring. Hope this doesn't break the semantics of `-u' ;-)Eelco Dolstra3-163/+171
2005-02-14 * Global configuration option `env-keep-derivations' to store pointerEelco Dolstra1-31/+37
to derivations in user environments. Nice for developers (since it prevents build-time-only dependencies from being GC'ed, in conjunction with `gc-keep-outputs'). Turned off by default.
2005-02-14 * Don't keep the derivation symlink when creating profile generations.Eelco Dolstra1-11/+6
2005-02-11 * Refactoring to support different installation sources in nix-env.Eelco Dolstra3-56/+101
* Set the references for the user environment manifest properly. * Don't copy the manifest (this was accidental). * Don't store derivation paths in the manifest (maybe this should be made optional). This cleans up the semantics of nix-env, which were weird. * Hash on the output paths of activated components, not on derivation paths. This is because we don't know the derivation path of already installed components anymore, and it allows the installation of components by store path (skipping Nix expressions entirely). * Query options `--out-path' and `--drv-path' to show the output and derivation paths of components, respectively (the latter replaces the `--expr' query).
2005-01-27 * Fix and simplify the garbage collector (it's still not concurrent,Eelco Dolstra2-10/+11
though). In particular it's now much easier to register a GC root. Just place a symlink to whatever store path it is that you want to keep in /nix/var/nix/gcroots.
2005-01-25 * Maintain the references/referers relation also for derivations.Eelco Dolstra1-1/+2
This simplifies garbage collection and `nix-store --query --requisites' since we no longer need to treat derivations specially. * Better maintaining of the invariants, e.g., setReferences() can only be called on a valid/substitutable path.
2005-01-19 * Renamed `normalise.cc' -> `build.cc', `storeexprs.cc' ->Eelco Dolstra1-1/+1
`derivations.cc', etc. * Store the SHA-256 content hash of store paths in the database after they have been built/added. This is so that we can check whether the store has been messed with (a la `rpm --verify'). * When registering path validity, verify that the closure property holds.
2005-01-19 * `nix-store --build' now builds its arguments in parallel instead ofEelco Dolstra1-1/+3
sequentially (within the limits set by `--jobs'). This should greatly improve the utilisation of the build farm when doing Nixpkgs builds.
2005-01-19 * Change extension `.store' to `.drv'.Eelco Dolstra1-1/+1
* Re-enable `nix-store --query --requisites'.
2005-01-19 * Started removing closure store expressions, i.e., the explicitEelco Dolstra3-16/+11
representation of closures as ATerms in the Nix store. Instead, the file system pointer graph is now stored in the Nix database. This has many advantages: - It greatly simplifies the implementation (we can drop the notion of `successors', and so on). - It makes registering roots for the garbage collector much easier. Instead of specifying the closure expression as a root, you can simply specify the store path that must be retained as a root. This could not be done previously, since there was no way to find the closure store expression containing a given store path. - Better traceability: it is now possible to query what paths are referenced by a path, and what paths refer to a path.
2005-01-17 * Removed the `id' attribute hack.Eelco Dolstra1-8/+1
* Formalise the notion of fixed-output derivations, i.e., derivations for which a cryptographic hash of the output is known in advance. Changes to such derivations should not propagate upwards through the dependency graph. Previously this was done by specifying the hash component of the output path through the `id' attribute, but this is insecure since you can lie about it (i.e., you can specify any hash and then produce a completely different output). Now the responsibility for checking the output is moved from the builder to Nix itself. A fixed-output derivation can be created by specifying the `outputHash' and `outputHashAlgo' attributes, the latter taking values `md5', `sha1', and `sha256', and the former specifying the actual hash in hexadecimal or in base-32 (auto-detected by looking at the length of the attribute value). MD5 is included for compatibility but should be considered deprecated. * Removed the `drvPath' pseudo-attribute in derivation results. It's no longer necessary. * Cleaned up the support for multiple output paths in derivation store expressions. Each output now has a unique identifier (e.g., `out', `devel', `docs'). Previously there was no way to tell output paths apart at the store expression level. * `nix-hash' now has a flag `--base32' to specify that the hash should be printed in base-32 notation. * `fetchurl' accepts parameters `sha256' and `sha1' in addition to `md5'. * `nix-prefetch-url' now prints out a SHA-1 hash in base-32. (TODO: a flag to specify the hash.)
2005-01-14 * Shorten SHA-256 hashes used in store path name generation to 160Eelco Dolstra1-6/+2
bits, then encode them in a radix-32 representation (using digits and letters except e, o, u, and t). This produces store paths like /nix/store/4i0zb0z7f88mwghjirkz702a71dcfivn-aterm-2.3.1. The nice thing about this is that the hash part of the file name is still 32 characters, as before with MD5. (Of course, shortening SHA-256 to 160 bits makes it no better than SHA-160 in theory, but hopefully it's a bit more resistant to attacks; it's certainly a lot slower.)
2005-01-14 * Start move towards SHA-256 hashes instead of MD5.Eelco Dolstra1-1/+1
* Start cleaning up unique store path generation (they weren't always unique; in particular the suffix ("-aterm-2.2", "-builder.sh") was not part of the hash, therefore changes to the suffix would cause multiple store objects with the same hash).
2005-01-13 * Refactoring to support SHA-1.Eelco Dolstra1-0/+4
2004-11-12 * Document --delete-generations and other nix-env options.Eelco Dolstra1-0/+4
2004-11-03 * string2ATerm -> overloaded toATerm.Eelco Dolstra1-17/+17
2004-10-29 * Drop ATmake / ATMatcher also in handling store expressions.Eelco Dolstra1-5/+7
2004-10-27 * Turn on read-only mode in queries. This prevents redundant store I/O.Eelco Dolstra1-0/+2
2004-10-26 * Don't use ATmake / ATmatch anymore, nor the ATMatcher class.Eelco Dolstra1-33/+30
Instead we generate data bindings (build and match functions) for the constructors specified in `constructors.def'. In particular this removes the conversions between AFuns and strings, and Nix expression evaluation now seems 3 to 4 times faster.
2004-10-14 * In `nix-env -q', sort derivations by name *without* caseEelco Dolstra1-1/+9
sensitivity.
2004-09-10 * Operation `--delete-generations' to delete generations of aEelco Dolstra4-21/+82
profile. Arguments are either generation number, or `old' to delete all non-current generations. Typical use: $ nix-env --delete-generations old $ nix-collect-garbage * istringstream -> string2Int.
2004-09-09 * A very dirty hack to make setuid installations a bit nicer to use.Eelco Dolstra1-0/+3
Previously there was the problem that all files read by nix-env etc. should be reachable and readable by the Nix user. So for instance building a Nix expression in your home directory meant that the home directory should have at least g+x or o+x permission so that the Nix user could reach the Nix expression. Now we just switch back to the original user just prior to reading sources and the like. The places where this happens are somewhat arbitrary, however. Any scope that has a live SwitchToOriginalUser object in it is executed as the original user. * Back out r1385. setreuid() sets the saved uid to the new real/effective uid, which prevents us from switching back to the original uid. setresuid() doesn't have this problem (although the manpage has a bug: specifying -1 for the saved uid doesn't leave it unchanged; an explicit value must be specified).
2004-08-18 * The default verbosity level of all Nix commands is now lvlInfo.Eelco Dolstra1-3/+0
* Builder output is written to standard error by default. * The option `-B' is gone. * The option `-Q' suppresses builder output. The result of this is that most Nix invocations shouldn't need any flags w.r.t. logging.
2004-07-01 * Nix-env operations now by default filter out any derivations forEelco Dolstra1-9/+28
system types other than the current system. I.e., `nix-env -i' won't install derivations for other system types, and `nix-env -q' won't show them. The flag `--system-filter SYSTEM' can be used to override the system type used for filtering (but not for building!). The value `*' can be used not to filter anything.
2004-07-01 * Align the columns in the output of `nix-env -q'.Eelco Dolstra1-4/+36
2004-07-01 * Allow the system attribute of derivations to be queried inEelco Dolstra1-37/+50
`nix-env -q'. * Queries can now be combined, e.g., `nix-env -q --status --system'.
2004-07-01 * Include some missing headers.Eelco Dolstra1-0/+1
2004-06-28 * By default, `nix-env -i' now deletes previously installedEelco Dolstra1-3/+21
derivations with names matching the derivations being installed. The option `--preserve-installed / -P' overrides this behaviour.
2004-06-28 * `nix-env -u' now allows a specific version to be specified whenEelco Dolstra1-4/+7
upgrading. This fixes a bug reported by Martin: $ nix-env -i foo-1.0 $ nix-env -u foo-1.0 upgrading foo-1.0 to foo-1.1
2004-06-28 * Added a switch `--fallback'. From the manual:Eelco Dolstra1-2/+1
Whenever Nix attempts to realise a derivation for which a closure is already known, but this closure cannot be realised, fall back on normalising the derivation. The most common scenario in which this is useful is when we have registered substitutes in order to perform binary distribution from, say, a network repository. If the repository is down, the realisation of the derivation will fail. When this option is specified, Nix will build the derivation instead. Thus, binary installation falls back on a source installation. This option is not the default since it is generally not desirable for a transient failure in obtaining the substitutes to lead to a full build from source (with the related consumption of resources).
2004-06-20 * Re-enable support for substitutes in the normaliser.Eelco Dolstra1-1/+1
* A better substitute mechanism. Instead of generating a store expression for each store path for which we have a substitute, we can have a single store expression that builds a generic program that is invoked to build the desired store path, which is passed as an argument. This means that operations like `nix-pull' only produce O(1) files instead of O(N) files in the store when registering N substitutes. (It consumes O(N) database storage, of course, but that's not a performance problem). * Added a test for the substitute mechanism. * `nix-store --substitute' reads the substitutes from standard input, instead of from the command line. This prevents us from running into the kernel's limit on command line length.
2004-05-12 * An quick and dirty hack to support distributed builds.Eelco Dolstra1-1/+1