lix/src/libstore
Eelco Dolstra 1511aa9f48 Allow remote builds without sending the derivation closure
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 17:57:40 +02:00
..
build.cc Allow remote builds without sending the derivation closure 2015-07-17 17:57:40 +02:00
derivations.cc Allow remote builds without sending the derivation closure 2015-07-17 17:57:40 +02:00
derivations.hh Allow remote builds without sending the derivation closure 2015-07-17 17:57:40 +02:00
gc.cc GC: Handle ENOSPC creating/moving to the trash directory 2015-06-30 21:41:26 +02:00
globals.cc Make /nix/var/nix/db/reserved bigger 2015-06-22 15:47:40 +02:00
globals.hh Add the pre-build hook. 2015-04-18 16:56:02 -04:00
local-store.cc Use posix_fallocate to create /nix/var/nix/db/reserved 2015-06-22 15:54:55 +02:00
local-store.hh Allow remote builds without sending the derivation closure 2015-07-17 17:57:40 +02:00
local.mk Fix using restricted mode with chroots 2015-04-16 18:46:17 +02:00
misc.cc Allow substitutes for builds that have preferLocalBuild set 2015-06-04 16:30:22 +02:00
misc.hh Allow remote builds without sending the derivation closure 2015-07-17 17:57:40 +02:00
nix-store.pc.in Install some pkgconfig files 2014-09-18 12:00:40 +02:00
optimise-store.cc Pedantry 2014-12-14 01:51:14 +01:00
pathlocks.cc Ensure we're writing to stderr in the builder 2014-12-12 14:35:44 +01:00
pathlocks.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
profiles.cc nix-collect-garbage: Don't call nix-env 2015-05-21 16:28:30 +02:00
profiles.hh nix-collect-garbage: Don't call nix-env 2015-05-21 16:28:30 +02:00
references.cc Use proper quotes everywhere 2014-08-20 18:03:48 +02:00
references.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
remote-store.cc Allow remote builds without sending the derivation closure 2015-07-17 17:57:40 +02:00
remote-store.hh Allow remote builds without sending the derivation closure 2015-07-17 17:57:40 +02:00
schema.sql * Store the size of a store path in the database (to be precise, the 2010-11-16 17:11:46 +00:00
store-api.cc Use proper quotes everywhere 2014-08-20 18:03:48 +02:00
store-api.hh Allow remote builds without sending the derivation closure 2015-07-17 17:57:40 +02:00
worker-protocol.hh Add a ‘verifyStore’ RPC 2015-06-02 02:14:24 +02:00