Eelco Dolstra
e81d38c02b
nix-shell: Execute shellHook if it exists
...
Since normal builds don't execute shellHook, this allows nix-shell
specific customisation. Suggested by Domen.
2014-02-17 13:34:24 +01:00
Eelco Dolstra
832377bbd6
Add a test for repairing paths
2014-02-17 12:22:50 +01:00
Eelco Dolstra
a9d99ab55f
download-via-ssh: Use readStorePath
2014-02-14 12:31:10 +01:00
Eelco Dolstra
4db572062c
download-via-ssh: Show where we're downloading from
2014-02-14 12:20:12 +01:00
Eelco Dolstra
dba33d4018
Minor style fixes
2014-02-14 11:48:42 +01:00
Eelco Dolstra
61fd494d76
Merge remote-tracking branch 'shlevy/ssh-substituter'
2014-02-14 11:42:47 +01:00
Shea Levy
f67f52751f
Indendation fix
...
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-12 07:33:07 -05:00
Shea Levy
62eb9eb76d
Remove relic of old code
...
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-12 07:27:45 -05:00
Shea Levy
7438f0bc2b
error messages start in lowercase
...
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-12 07:26:35 -05:00
Shea Levy
2246aa77d2
Remove using declarations from download-via-ssh
...
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-12 07:22:36 -05:00
Eelco Dolstra
f9fc6acbf4
Document current meaning of preferLocalBuild
...
Closes #208 .
2014-02-12 10:53:22 +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