aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-10-06nix-store --serve: Implement log size limitEelco Dolstra
2015-10-01nix-prefetch-url: Support prefetching from a Nix expressionEelco Dolstra
For example, $ nix-prefetch-url -A hello.src will prefetch the file specified by the fetchurl call in the attribute ‘hello.src’ from the Nix expression in the current directory. This differs from ‘nix-build -A hello.src’ in that it doesn't verify the hash. You can also specify a path to the Nix expression: $ nix-prefetch-url ~/Dev/nixpkgs -A hello.src List elements (typically used in ‘patches’ attributes) also work: $ nix-prefetch-url -A portmidi.patches.0
2015-10-01nix-prefetch-url: $PRINT_PATH -> --print-pathEelco Dolstra
2015-10-01nix-prefetch-url: Rewrite in C++Eelco Dolstra
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-09-03Implement buildDerivation() via the daemonEelco Dolstra
2015-09-02Filter build-chroot-dirs entries that conflict with derivation outputsEelco Dolstra
Fixes https://github.com/NixOS/nixpkgs/issues/9504. Note that this means we may have a non-functional /bin/sh in the chroot while rebuilding Bash or one of its dependencies. Ideally those packages don't rely on /bin/sh though.
2015-09-02Remove unused variableEelco Dolstra
2015-08-24Prevent .chroot from being GC'ed when using LocalStore::buildDerivation()Eelco Dolstra
Fixes #616.
2015-08-21nix-collect-garbage: Revive --max-freedEelco Dolstra
Fixes #609.
2015-08-19Remove unneeded HAVE_UNSHARE.Manolis Ragkousis
* src/libstore/build.cc (CHROOT_ENABLED): Remove HAVE_UNSHARE.
2015-08-07baseNameOf: Enhance `basename` compatibilityKirill Elagin
* If the path ends with a slash, drop it. * If the remaining path doesn’t contain slashes, just return it. Fixes #574.
2015-08-04Don't include <iostream> before config.hEelco Dolstra
This breaks the build on 32-bit systems. http://hydra.nixos.org/build/24373658
2015-08-03Handle debug messages from runChild()Eelco Dolstra
Turns out that "nix-build -vvv" with chroots enabled has been broken for some time, because some debug message got interpreted as an error.
2015-08-03Removed unnecessary includedIwan Aucamp
2015-07-31Fix stack consumptionEelco Dolstra
2015-07-31Output line number on infinite recursionIwan Aucamp
2015-07-28Add sort primopEelco Dolstra
2015-07-28Add primop genListEelco Dolstra
This can be used to implement functions like ‘imap’ (or for that matter, ‘map’) without the quadratic complexity incurred by calling ‘++’ repeatedly.
2015-07-26Remove unnecessary parenthesesEelco Dolstra
2015-07-24Add replaceStrings primopEelco Dolstra
This is a generalisation of replaceChars in Nixpkgs.
2015-07-24Add concatStringsSep as a primopEelco Dolstra
This fixes the quadratic behaviour of concatStrings/concatStringsSep in Nixpkgs.
2015-07-23CleanupEelco Dolstra
2015-07-23Optimize empty setsEelco Dolstra
This reduces the number of Bindings allocations by about 10%.
2015-07-23Fix fetchurl of executable fileEelco Dolstra
Pointed out by @cstrahan, thanks!
2015-07-23Merge branch 'attr-set-hh' of https://github.com/nbp/nixEelco Dolstra
Conflicts: src/libexpr/eval.cc
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-23Add primops all and anyEelco Dolstra
These are used thousands of times during NixOS evaluation, so it's useful to speed them up.
2015-07-23Importing derivations: Add name attribute to make a valid drvShea Levy
2015-07-23Allow derivations-as-srcs in the context of builtins.toFile filesShea Levy
2015-07-23Add foldl' primopEelco Dolstra
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-21Fix Darwin buildEelco Dolstra
Turns out getgrouplist() is not POSIX. http://hydra.nixos.org/build/23881243
2015-07-20Make <nix/fetchurl.nix> a builtin builderEelco Dolstra
This ensures that 1) the derivation doesn't change when Nix changes; 2) the derivation closure doesn't contain Nix and its dependencies; 3) we don't have to rely on ugly chroot hacks.
2015-07-20Provide more detailed info about build status to hydra-queue-runnerEelco Dolstra
In particular, hydra-queue-runner can now distinguish between remote build / substitution / already-valid. For instance, if a path already existed on the remote side, we don't want to store a log file.
2015-07-20nix-copy-closure: Add -v flagEelco Dolstra
And make exportPath() less spammy by default.
2015-07-20Support systemd log severity prefixesEelco Dolstra
This is mostly useful for hydra-queue-runner.
2015-07-20More cleanupEelco Dolstra
2015-07-17OCD: foreach -> C++11 ranged forEelco Dolstra
2015-07-17Allow remote builds without sending the derivation closureEelco Dolstra
Previously, to build a derivation remotely, we had to copy the entire closure of the .drv file to the remote machine, even though we only need the top-level derivation. This is very wasteful: the closure can contain thousands of store paths, and in some Hydra use cases, include source paths that are very large (e.g. Git/Mercurial checkouts). So now there is a new operation, StoreAPI::buildDerivation(), that performs a build from an in-memory representation of a derivation (BasicDerivation) rather than from a on-disk .drv file. The only files that need to be in the Nix store are the sources of the derivation (drv.inputSrcs), and the needed output paths of the dependencies (as described by drv.inputDrvs). "nix-store --serve" exposes this interface. Note that this is a privileged operation, because you can construct a derivation that builds any store path whatsoever. Fixing this will require changing the hashing scheme (i.e., the output paths should be computed from the other fields in BasicDerivation, allowing them to be verified without access to other derivations). However, this would be quite nice because it would allow .drv-free building (e.g. "nix-env -i" wouldn't have to write any .drv files to disk). Fixes #173.
2015-07-17Make printValue() interruptibleEelco Dolstra
Fixes #572.
2015-07-17nix-collect-garbage: Handle ENOENTEelco Dolstra
Don't barf trying to read a link that just got deleted. Fixes #575.
2015-07-14Move attribute set data structures into their own header file.Nicolas B. Pierron
This modification moves Attr and Bindings structures into their own header file which is dedicated to the attribute set representation. The goal of to isolate pieces of code which are related to the attribute set representation. Thus future modifications of the attribute set representation will only have to modify these files, and not every other file across the evaluator.
2015-07-03Fix the parsing of "$"'s in strings.Guillaume Maudoux
2015-07-03Fix the hack that resets the scanner state.Guillaume Maudoux
2015-07-02TypoEelco Dolstra
2015-07-01Preserve supplementary groups of build usersLudovic Courtès
The following patch is an attempt to address this bug (see <http://bugs.gnu.org/18994>) by preserving the supplementary groups of build users in the build environment. In practice, I would expect that supplementary groups would contain only one or two groups: the build users group, and possibly the “kvm” group. [Changed &at(0) to data() and removed tabs - Eelco]
2015-06-30GC: Handle ENOSPC creating/moving to the trash directoryEelco Dolstra
Issue #564.