aboutsummaryrefslogtreecommitdiff
path: root/src/nix-env
AgeCommit message (Collapse)Author
2016-02-12Merge pull request #762 from ctheune/ctheune-floatsEelco Dolstra
Implement floats
2016-02-04Eliminate the "store" global variableEelco Dolstra
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.)
2016-01-05First hit at providing support for floats in the language.Christian Theune
2015-11-21Print license information on '--xml --meta'Pascal Wittmann
The nixpkgs manual prescribes the use of values from stdenv.lib.licenses for the meta.license attribute. Those values are attribute sets and currently skipped when running nix-env with '--xml --meta'. This has the consequence that also nixpkgs-lint will report missing licenses. With this commit nix-env with '--xml --meta' will print all attributes of an attribute set that are of type tString. For example the output for the package nixpkgs.hello is <meta name="license" type="strings"> <string type="url" value="http://spdx.org/licenses/GPL-3.0+" /> <string type="shortName" value="gpl3Plus" /> <string type="fullName" value="GNU General Public License v3.0 or later" /> <string type="spdxId" value="GPL-3.0+" /> </meta> This commit fixes nixpkgs-lint, too.
2015-09-18Shut up clang warningsEelco Dolstra
2015-09-17nix-env --upgrade: show "downgrading" when doing soVladimír Čunát
It was strange to show "upgrading" when the version was getting lower. This is left on "upgrading" when the versions are the same, as I can't see any better wording.
2015-09-17nix-env --upgrade: avoid unexpected downgradesVladimír Čunát
Until now, if one explicitly installed a low-priority version, nix-env --upgrade would downgrade it by default and even with --leq. Let's never accept an upgrade with version not matching the upgradeType. Additionally, let's never decrease the priority of an installed package; you can use --install to force that. Also refactor to use variable bestVersion instead of bestName, as only version was used from it.
2015-07-23Optimize small listsEelco Dolstra
The value pointers of lists with 1 or 2 elements are now stored in the list value itself. In particular, this makes the "concatMap (x: if cond then [(f x)] else [])" idiom cheaper.
2015-07-23--version: Print some config infoEelco Dolstra
Such as whether Nix is built with signed binary cache support, and the location of the configuration file.
2015-07-17OCD: foreach -> C++11 ranged forEelco Dolstra
2015-05-21nix-collect-garbage: Don't call nix-envEelco Dolstra
Also, make sure --delete-older-than doesn't delete the current generation.
2015-05-21Move profiles.{cc,hh} to libstoreEelco Dolstra
2015-05-21Merge branch 'submit/sparse-generation-symlinks' of ↵Eelco Dolstra
https://github.com/ctheune/nix
2015-05-20Mis-read Eelko's request to not make this an option: now, let's not makeChristian Theune
it an option. :)
2015-05-19Implement alternative to lazy generations:Christian Theune
* only the last generation can be lazy * depend on the '--lazy-generation' flag to be set
2015-05-18Enable lazy/sparse allocation of generation symlinks: avoid creatingChristian Theune
new generations if a generation already exists. Alternatively or additionally I propose a mode where only the *last* generation will be sparse.
2015-05-05Allow URLs in the Nix search pathEelco Dolstra
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-04-09Implement caching of fetchurl/fetchTarball resultsEelco Dolstra
ETags are used to prevent redownloading unchanged files.
2015-03-19Fix Boehm API violationEelco Dolstra
We were calling GC_INIT() after doing an allocation (in the baseEnv construction), which is not allowed.
2015-01-15Fix assertion failure in nix-envEelco Dolstra
$ 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
2014-09-23Add --force-name support for --set in nix-env, to support ↵Shell Turner
nix-install-package --set
2014-09-19Store Attrs inside BindingsEelco Dolstra
This prevents a double allocation per attribute set.
2014-08-20Use pager for more commandsEelco Dolstra
2014-08-20Use proper quotes everywhereEelco Dolstra
2014-08-20Add some colorEelco Dolstra
2014-08-18Fix --attr parsingEelco Dolstra
2014-08-13Refactor option handlingEelco Dolstra
2014-08-01Make readDirectory() return inode / file typeEelco Dolstra
2014-06-02nix-env -qa --json: Generate valid JSON even if there are invalid meta attrsEelco Dolstra
2014-05-26Ensure that -I flags get included in nixPathEelco Dolstra
Also fixes #261.
2014-04-15nix-env: Minor change to '--delete-generations Nd' semanticsRicardo M. Correia
The option '--delete-generations Nd' deletes all generations older than N days. However, most likely the user does not want to delete the generation that was active N days ago. For example, say that you have these 3 generations: 1: <30 days ago> 2: <15 days ago> 3: <1 hour ago> If you do --delete-generations 7d (say, as part of a cron job), most likely you still want to keep generation 2, i.e. the generation that was active 7 days ago (and for most of the past 7 days, in fact). This patch fixes this issue. Note that this also affects 'nix-collect-garbage --delete-older-than Nd'. Thanks to @roconnor for noticing the issue!
2014-04-04Show position info in string concatenation / addition errorsEelco Dolstra
2014-03-30nix-env: Add support for --delete-generations 15dRicardo M. Correia
It will delete all generations older than the specified number of days.
2014-03-11Fix passing meta attribute to buildenv.nixEelco Dolstra
Since the meta attributes were not sorted, attribute lookup could fail, leading to package priorities and active flags not working correctly. Broken since 0f24400d90daf65cf20142a662f8245008437e2c.
2014-02-27Set up a minimal /dev in chrootsEelco Dolstra
Not bind-mounting the /dev from the host also solves the problem with /dev/shm being a symlink to something not in the chroot.
2014-02-18Add a flag ‘--check’ to verify build determinismEelco Dolstra
The flag ‘--check’ to ‘nix-store -r’ or ‘nix-build’ will cause Nix to redo the build of a derivation whose output paths are already valid. If the new output differs from the original output, an error is printed. This makes it easier to test if a build is deterministic. (Obviously this cannot catch all sources of non-determinism, but it catches the most common one, namely the current time.) For example: $ nix-build '<nixpkgs>' -A patchelf ... $ nix-build '<nixpkgs>' -A patchelf --check error: derivation `/nix/store/1ipvxsdnbhl1rw6siz6x92s7sc8nwkkb-patchelf-0.6' may not be deterministic: hash mismatch in output `/nix/store/4pc1dmw5xkwmc6q3gdc9i5nbjl4dkjpp-patchelf-0.6.drv' The --check build fails if not all outputs are valid. Thus the first call to nix-build is necessary to ensure that all outputs are valid. The current outputs are left untouched: the new outputs are either put in a chroot or diverted to a different location in the store using hash rewriting.
2014-02-01Remove AutomakefilesEelco Dolstra
2014-02-01Update Makefile variable namesEelco Dolstra
2014-01-30Rename Makefile -> local.mkEelco Dolstra
2014-01-21Merge branch 'master' into makeEelco Dolstra
Conflicts: src/libexpr/eval.cc
2014-01-21Remove unused typeEelco Dolstra
2014-01-09Update MakefilesEelco Dolstra
2013-12-20nix-env --set-flag: Barf if a selector doesn't match any installed packageEelco Dolstra
Fixes #184.
2013-11-25Rename Makefile.new -> MakefileEelco Dolstra
2013-11-23Improve building dynamic librariesEelco Dolstra
They now get a correct RPATH.
2013-11-22Rename $(here) to $(d) for brevity, and remove trailing slashEelco Dolstra
2013-11-22Add missing #includeEelco Dolstra
2013-11-22New non-recursive, plain Make-based build systemEelco Dolstra
2013-11-19Check meta values and warn about bad onesEelco Dolstra
2013-11-19Generalise meta attributesEelco Dolstra