about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2015-07-31 Output line number on infinite recursionIwan Aucamp3-13/+14
2015-07-28 Add sort primopEelco Dolstra1-1/+36
2015-07-28 Add primop genListEelco Dolstra1-0/+20
This can be used to implement functions like ‘imap’ (or for that matter, ‘map’) without the quadratic complexity incurred by calling ‘++’ repeatedly.
2015-07-26 Remove unnecessary parenthesesEelco Dolstra1-2/+2
2015-07-24 Add replaceStrings primopEelco Dolstra1-1/+37
This is a generalisation of replaceChars in Nixpkgs.
2015-07-24 Add concatStringsSep as a primopEelco Dolstra1-0/+21
This fixes the quadratic behaviour of concatStrings/concatStringsSep in Nixpkgs.
2015-07-23 CleanupEelco Dolstra2-18/+13
2015-07-23 Optimize empty setsEelco Dolstra3-4/+14
This reduces the number of Bindings allocations by about 10%.
2015-07-23 Fix fetchurl of executable fileEelco Dolstra1-1/+1
Pointed out by @cstrahan, thanks!
2015-07-23 Merge branch 'attr-set-hh' of https://github.com/nbp/nixEelco Dolstra4-94/+142
Conflicts: src/libexpr/eval.cc
2015-07-23 Optimize small listsEelco Dolstra11-121/+157
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 Add primops all and anyEelco Dolstra1-0/+33
These are used thousands of times during NixOS evaluation, so it's useful to speed them up.
2015-07-23 Importing derivations: Add name attribute to make a valid drvShea Levy1-1/+3
2015-07-23 Allow derivations-as-srcs in the context of builtins.toFile filesShea Levy1-2/+6
2015-07-23 Add foldl' primopEelco Dolstra1-0/+24
2015-07-23 --version: Print some config infoEelco Dolstra3-2/+28
Such as whether Nix is built with signed binary cache support, and the location of the configuration file.
2015-07-21 Fix Darwin buildEelco Dolstra1-1/+4
Turns out getgrouplist() is not POSIX. http://hydra.nixos.org/build/23881243
2015-07-20 Make <nix/fetchurl.nix> a builtin builderEelco Dolstra7-5/+60
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-20 Provide more detailed info about build status to hydra-queue-runnerEelco Dolstra2-47/+75
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-20 nix-copy-closure: Add -v flagEelco Dolstra1-1/+3
And make exportPath() less spammy by default.
2015-07-20 Support systemd log severity prefixesEelco Dolstra3-1/+18
This is mostly useful for hydra-queue-runner.
2015-07-20 More cleanupEelco Dolstra9-296/+184
2015-07-17 OCD: foreach -> C++11 ranged forEelco Dolstra30-874/+849
2015-07-17 Allow remote builds without sending the derivation closureEelco Dolstra12-154/+372
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-17 Make printValue() interruptibleEelco Dolstra1-0/+2
Fixes #572.
2015-07-17 nix-collect-garbage: Handle ENOENTEelco Dolstra1-1/+6
Don't barf trying to read a link that just got deleted. Fixes #575.
2015-07-14 Move attribute set data structures into their own header file.Nicolas B. Pierron4-94/+142
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-03 Fix the parsing of "$"'s in strings.Guillaume Maudoux1-6/+5
2015-07-03 Fix the hack that resets the scanner state.Guillaume Maudoux2-42/+19
2015-07-02 TypoEelco Dolstra1-1/+1
2015-07-01 Preserve supplementary groups of build usersLudovic Courtès1-2/+18
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-30 GC: Handle ENOSPC creating/moving to the trash directoryEelco Dolstra1-8/+23
Issue #564.
2015-06-22 Use posix_fallocate to create /nix/var/nix/db/reservedEelco Dolstra1-1/+11
2015-06-22 Make /nix/var/nix/db/reserved biggerEelco Dolstra1-1/+1
Issue #564.
2015-06-17 Support URLs in $NIX_PATHEelco Dolstra3-1/+32
This didn't work (despite claims in the manual), because the colon in "http://" was parsed as a element separator. So handle "://" specially.
2015-06-10 Export outputPaths functionEelco Dolstra3-11/+12
This is useful for the new hydra-queue-runner.
2015-06-09 Use std::vector::data()Eelco Dolstra3-12/+8
2015-06-04 Allow substitutes for builds that have preferLocalBuild setEelco Dolstra3-10/+18
Not substituting builds with "preferLocalBuild = true" was a bad idea, because it didn't take the cost of dependencies into account. For instance, if we can't substitute a fetchgit call, then we have to download/build git and all its dependencies. Partially reverts 5558652709f27e8a887580b77b93c705659d7a4b and adds a new derivation attribute "allowSubstitutes" to specify whether a derivation may be substituted.
2015-06-04 Chown files created for passAsFileEelco Dolstra1-2/+7
Nixpkgs' writeTextAsFile does this: mv "$textPath" "$n" Since $textPath was owned by root, if $textPath is on the same filesystem as $n, $n will be owned as root. As a result, the build result was rejected as having suspicious ownership. http://hydra.nixos.org/build/22836807
2015-06-02 Don't let unprivileged users repair pathsEelco Dolstra1-7/+9
2015-06-02 Use StoreAPI::verifyStore()Eelco Dolstra1-1/+1
2015-06-02 Add a ‘verifyStore’ RPCLudovic Courtès5-1/+27
Hello! The patch below adds a ‘verifyStore’ RPC with the same signature as the current LocalStore::verifyStore method. Thanks, Ludo’. >From aef46c03ca77eb6344f4892672eb6d9d06432041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org> Date: Mon, 1 Jun 2015 23:17:10 +0200 Subject: [PATCH] Add a 'verifyStore' remote procedure call.
2015-06-01 Add tarball testsEelco Dolstra1-1/+1
2015-06-01 Document tarball downloadingEelco Dolstra1-0/+1
2015-06-01 Fix fetchurl/fetchTarballEelco Dolstra1-1/+2
2015-06-01 readFile: Check against nul bytesEelco Dolstra1-1/+4
2015-05-22 Fix import-from-derivation in restricted eval modeEelco Dolstra1-0/+7
This relaxes restricted mode to allow access to anything in the store. In the future, it would be better to allow access to only paths that have been constructed in the current evaluation (so a hard-coded /nix/store/blabla in a Nix expression would still be rejected). However, note that reading /nix/store itself is still rejected, so you can't use this so get access to things you don't know about.
2015-05-22 Remove dead codeEelco Dolstra1-18/+0
2015-05-21 nix-collect-garbage: Don't call nix-envEelco Dolstra4-69/+110
Also, make sure --delete-older-than doesn't delete the current generation.
2015-05-21 Move profiles.{cc,hh} to libstoreEelco Dolstra2-0/+0