Commit graph

3661 commits

Author SHA1 Message Date
Eelco Dolstra f9fc6acbf4 Document current meaning of preferLocalBuild
Closes #208.
2014-02-12 10:53:22 +01:00
Eelco Dolstra a35c6eb4a2 Support setting CFLAGS and CXXFLAGS for libraries/programs 2014-02-11 14:15:57 +01:00
Eelco Dolstra 1f841c9d50 Force use of Bash
"echo -n" doesn't work with /bin/sh on Darwin.
2014-02-10 17:42:36 +01:00
Eelco Dolstra 57386c9bae Binary tarball: Automatically create /nix
The tarball can now be unpacked anywhere.  The installation script
uses "sudo" to create /nix if it doesn't exist.  It also fetches the
nixpkgs-unstable channel.
2014-02-10 16:35:59 +01:00
Shea Levy c89d6b9b63 nix-store --serve: Use a versioned protocol
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-10 07:43:13 -05:00
Shea Levy 38c3beac1a Move StoreApi::serve into opServe
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-10 06:52:48 -05:00
Shea Levy 1614603165 Pass in params by const ref
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-10 06:49:37 -05:00
Shea Levy 78d979567f Clarify comment
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-10 06:43:29 -05:00
Eelco Dolstra c5839752b9 Binary tarball: Automatically fetch the Nixpkgs channel 2014-02-10 10:50:29 +01:00
Eelco Dolstra b632153ebd nix-shell: Use shell.nix as the default expression if it exists 2014-02-10 10:25:13 +01:00
Shea Levy 64e23d0a38 Add download-via-ssh substituter
This substituter connects to a remote host, runs nix-store --serve
there, and then forwards substituter commands on to the remote host and
sends their results to the calling program. The ssh-substituter-hosts
option can be specified as a list of hosts to try.

This is an initial implementation and, while it works, it has some
limitations:

* Only the first host is used
* There is no caching of query results (all queries are sent to the
  remote machine)
* There is no informative output (such as progress bars)
* Some failure modes may cause unhelpful error messages
* There is no concept of trusted-ssh-substituter-hosts

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-08 00:13:33 -05:00
Shea Levy 5671188eb2 nix-store --serve: Flush out after every loop
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-08 00:13:33 -05:00
Shea Levy 73874629ef nix-store --serve: Use dump instead of export
Also remove signing support

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-08 00:13:33 -05:00
Shea Levy 188f96500b nix-store --serve: Don't fail if asked for info about non-valid path
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-08 00:13:33 -05:00
Shea Levy 9488447594 nix-store --serve: Don't loop forever
nix-store --export takes a tmproot, which can only release by exiting.
Substituters don't currently work in a way that could take advantage of
the looping, anyway.

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-08 00:13:32 -05:00
Shea Levy 3a38d0f356 Add the nix-store --serve command
This is essentially the substituter API operating on the local store,
which will be used by the ssh substituter. It runs in a loop rather than
just taking one command so that in the future nix will be able to keep
one connection open for multiple instances of the substituter.

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-08 00:13:32 -05:00
Shea Levy 84a8b5e9af nix-instantiate --eval-only --read-write-mode: Don't depend on ordering
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-07 18:03:38 +01:00
Shea Levy e4058fab64 Rename --no-readonly-mode --read-write-mode
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-07 18:03:38 +01:00
Shea Levy 0c3e8a616e nix-instantiate: Add a --no-readonly-mode flag
This allows running nix-instantiate --eval-only without performing the
evaluation in readonly mode, letting features like import from
derivation and automatic substitution of builtins.storePath paths work.

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-07 18:03:38 +01:00
Eelco Dolstra 0432bc52ea Fix the RPM build 2014-02-07 17:36:04 +01:00
Eelco Dolstra 7fab23e237 Install header files 2014-02-07 17:36:04 +01:00
Eelco Dolstra 764d90597a Merge commit 'a210c995cdd9279ed4137ec5d2e4cc928cb36097' 2014-02-07 16:27:34 +01:00
Eelco Dolstra a210c995cd Support DESTDIR 2014-02-07 16:21:27 +01:00
Eelco Dolstra 97f8e9bc76 Remove dead code 2014-02-06 19:06:08 +01:00
Eelco Dolstra 2a469ad31d Set a maintainer address
Issue #202.
2014-02-06 14:37:35 +01:00
Eelco Dolstra 1f94ec3924 Clean up a test warning 2014-02-06 13:54:44 +01:00
Eelco Dolstra 20d0598928 Drop dependency on ‘expr’
http://hydra.nixos.org/build/8715639

Not sure why this causes a failure now.
2014-02-06 13:51:57 +01:00
Eelco Dolstra 4161fce472 Create the target directory of libraries and programs 2014-02-06 11:30:05 +01:00
Eelco Dolstra 80b691316c Fix version in nix.spec
http://hydra.nixos.org/build/8715502
2014-02-04 11:21:13 +01:00
Eelco Dolstra 4ee6001f95 GNU Make 3.81 compatibility
3.81 doesn't understand the ‘define foo =’ syntax, which was added in
3.82.  So use ‘define foo’ instead.
2014-02-04 11:21:13 +01:00
Eelco Dolstra 0da82efa5d GNU Make 3.81 compatibility
3.81 doesn't understand the ‘define foo =’ syntax, which was added in
3.82.  So use ‘define foo’ instead.
2014-02-04 11:02:49 +01:00
Eelco Dolstra 143224f7cd Add nix.spec to the distribution 2014-02-04 10:09:45 +01:00
Eelco Dolstra d210cdc435 Fix assertion failure in ‘nix-store --load-db’
Namely:

  nix-store: derivations.cc:242: nix::Hash nix::hashDerivationModulo(nix::StoreAPI&, nix::Derivation): Assertion `store.isValidPath(i->first)' failed.

This happened because of the derivation output correctness check being
applied before the references of a derivation are valid.
2014-02-03 22:36:07 +01:00
Eelco Dolstra 73a775f3b7 Merge commit '8468806552d6730abec6431c42b5b0e897c0222c' 2014-02-03 19:57:02 +01:00
Eelco Dolstra 8468806552 Add a basic README 2014-02-03 17:05:55 +01:00
Eelco Dolstra d6582c04c1 Give a friendly error message if the DB directory is not writable
Previously we would say "error: setting synchronous mode: unable to
open database file" which isn't very helpful.
2014-02-01 16:57:38 +01:00
Eelco Dolstra 2f9bb5c7e7 Merge branch 'make' 2014-02-01 16:41:52 +01:00
Eelco Dolstra 6dca72006a Only run "git ls-files" when doing "make check" 2014-02-01 16:30:24 +01:00
Eelco Dolstra 2a97f7b039 Fix logging test 2014-02-01 16:08:59 +01:00
Eelco Dolstra 965218a62a Remove obsolete file 2014-02-01 16:08:51 +01:00
Eelco Dolstra b6465ae5d3 Merge commit '28dc4883356a50f2805a3e3c819a541c44a4ff0a' into make 2014-02-01 15:37:59 +01:00
Eelco Dolstra 762ef464f8 Fix the nix-profile test 2014-02-01 15:37:50 +01:00
Eelco Dolstra 28dc488335 installcheck: Don't depend on install
This is a hack to prevent "installcheck" from clobbering files fixed
up by Nixpkgs' fixupPhase.
2014-02-01 15:33:27 +01:00
Eelco Dolstra 844d83352c More "make dist" fixes 2014-02-01 15:18:48 +01:00
Eelco Dolstra 74ca70da3a Add 'mk/' from commit '1eff3ad37fdb9dcf9f8528fdacea0ebf0e79d545'
git-subtree-dir: mk
git-subtree-mainline: 6ef32bddc1
git-subtree-split: 1eff3ad37f
2014-02-01 14:38:28 +01:00
Eelco Dolstra 6ef32bddc1 Fix "make dist" 2014-02-01 14:38:12 +01:00
Eelco Dolstra 1eff3ad37f Add missing file 2014-02-01 14:36:44 +01:00
Eelco Dolstra 6f8aa145d4 Improve "make dist" 2014-02-01 14:22:08 +01:00
Eelco Dolstra 0c6d62cf27 Remove Automakefiles 2014-02-01 13:54:38 +01:00
Eelco Dolstra 16e7d69209 Update Makefile variable names 2014-02-01 13:54:38 +01:00