aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2014-07-24Implement nix-copy-closure --from via nix-store --serveEelco Dolstra
2014-07-24build-remote.pl: Be less verbose on failing buildsEelco Dolstra
2014-07-14Remove cruftEelco Dolstra
2014-07-12build-remote.pl: Fix build logEelco Dolstra
2014-07-11build-remote.pl: Use ‘nix-store --serve’ on the remote sideEelco Dolstra
This makes things more efficient (we don't need to use an SSH master connection, and we only start a single remote process) and gets rid of locking issues (the remote nix-store process will keep inputs and outputs locked as long as they're needed). It also makes it more or less secure to connect directly to the root account on the build machine, using a forced command (e.g. ‘command="nix-store --serve --write"’). This bypasses the Nix daemon and is therefore more efficient. Also, don't call nix-store to import the output paths.
2014-07-10nix-copy-closure -s: Do substitutions via ‘nix-store --serve’Eelco Dolstra
This means we no longer need an SSH master connection, since we only execute a single command on the remote host.
2014-07-10nix-copy-closure: Restore compression and the progress viewerEelco Dolstra
2014-05-26nix-build: --add-root also takes 1 parameterAristid Breitkreuz
2014-04-10Don't barf when installing as rootEelco Dolstra
2014-04-08nix-shell --pure: Keep the user's $PAGEREelco Dolstra
2014-03-30nix-collect-garbage: Add --delete-older-than optionRicardo M. Correia
2014-03-30Fix nix-shell for derivation with multiple outputsMaxim Ivanov
If derivation declares multiple outputs and first (default) output if not "out", then "nix-instantiate" calls return path with output names appended after "!". Than suffix must be stripped before ant path checks are done.
2014-03-17nix-build: Fix --cores flagEelco Dolstra
2014-02-26Installer: Handle DarwinEelco Dolstra
"cp -r" doesn't copy symlinks properly on Darwin, but "cp -R" does. Fixes #215.
2014-02-26Also provide an option for setting the curl connection timeoutEelco Dolstra
2014-02-26Respect $NIX_CONNECT_TIMEOUT properlyEelco Dolstra
We were 1) using CURLOPT_TIMEOUT instead of CURLOPT_CONNECTTIMEOUT; 2) not passing it to the curl child process. Issue #93.
2014-02-26Add ~/.nix-profile/sbin to $PATHEelco Dolstra
Fixes #112.
2014-02-26Fix broken patchEelco Dolstra
2014-02-26use USER environmental variable if getting user id by getpwuid is failed in ↵Ian-Woo Kim
perl scripts: download-from-binary-cache.pl and nix-channel
2014-02-19nix-shell: Add --packages flagEelco Dolstra
This allows you to easily set up a build environment containing the specified packages from Nixpkgs. For example: $ nix-shell -p sqlite xorg.libX11 hello will start a shell in which the given packages are present.
2014-02-19nix-instantiate: Add a flag --expr / -E to read expressions from the command ↵Eelco Dolstra
line This is basically a shortcut for ‘echo 'expr...' | nix-instantiate -’. Also supported by nix-build and nix-shell.
2014-02-19nix-shell: Don't leave a temporary directory in /tmp behindEelco Dolstra
2014-02-18Add a flag ‘--check’ to verify build determinismEelco Dolstra
The flag ‘--check’ to ‘nix-store -r’ or ‘nix-build’ will cause Nix to redo the build of a derivation whose output paths are already valid. If the new output differs from the original output, an error is printed. This makes it easier to test if a build is deterministic. (Obviously this cannot catch all sources of non-determinism, but it catches the most common one, namely the current time.) For example: $ nix-build '<nixpkgs>' -A patchelf ... $ nix-build '<nixpkgs>' -A patchelf --check error: derivation `/nix/store/1ipvxsdnbhl1rw6siz6x92s7sc8nwkkb-patchelf-0.6' may not be deterministic: hash mismatch in output `/nix/store/4pc1dmw5xkwmc6q3gdc9i5nbjl4dkjpp-patchelf-0.6.drv' The --check build fails if not all outputs are valid. Thus the first call to nix-build is necessary to ensure that all outputs are valid. The current outputs are left untouched: the new outputs are either put in a chroot or diverted to a different location in the store using hash rewriting.
2014-02-17nix-shell: Execute shellHook if it existsEelco Dolstra
Since normal builds don't execute shellHook, this allows nix-shell specific customisation. Suggested by Domen.
2014-02-10Force use of BashEelco Dolstra
"echo -n" doesn't work with /bin/sh on Darwin.
2014-02-10Binary tarball: Automatically create /nixEelco Dolstra
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-10Binary tarball: Automatically fetch the Nixpkgs channelEelco Dolstra
2014-02-10nix-shell: Use shell.nix as the default expression if it existsEelco Dolstra
2014-02-01Merge branch 'make'Eelco Dolstra
2014-02-01Fix "make dist"Eelco Dolstra
2014-02-01Remove AutomakefilesEelco Dolstra
2014-02-01Update Makefile variable namesEelco Dolstra
2014-01-30Rename Makefile -> local.mkEelco Dolstra
2014-01-23nix-shell: Add --impure flagEelco Dolstra
This is currently the default, but I might change that to --pure in the future.
2014-01-23nix-shell: Preserve the TZ variable of the userEelco Dolstra
2014-01-23nix-build: RefactorEelco Dolstra
2014-01-21Merge branch 'master' into makeEelco Dolstra
Conflicts: src/libexpr/eval.cc
2014-01-15nix-profile.sh: Add the Nixpkgs channel to $NIX_PATHEelco Dolstra
2014-01-13nix-shell: Don't set NIX_INDENT_MAKEEelco Dolstra
It generally is not useful in interactive environments (and messes up some non-ANSI-compliant terminals).
2014-01-13nix-shell: Set $IN_NIX_SHELL before evaluatingEelco Dolstra
2014-01-08Support cryptographically signed binary cachesEelco Dolstra
NAR info files in binary caches can now have a cryptographic signature that Nix will verify before using the corresponding NAR file. To create a private/public key pair for signing and verifying a binary cache, do: $ openssl genrsa -out ./cache-key.sec 2048 $ openssl rsa -in ./cache-key.sec -pubout > ./cache-key.pub You should also come up with a symbolic name for the key, such as "cache.example.org-1". This will be used by clients to look up the public key. (It's a good idea to number keys, in case you ever need to revoke/replace one.) To create a binary cache signed with the private key: $ nix-push --dest /path/to/binary-cache --key ./cache-key.sec --key-name cache.example.org-1 The public key (cache-key.pub) should be distributed to the clients. They should have a nix.conf should contain something like: signed-binary-caches = * binary-cache-public-key-cache.example.org-1 = /path/to/cache-key.pub If all works well, then if Nix fetches something from the signed binary cache, you will see a message like: *** Downloading ‘http://cache.example.org/nar/7dppcj5sc1nda7l54rjc0g5l1hamj09j-subversion-1.7.11’ (signed by ‘cache.example.org-1’) to ‘/nix/store/7dppcj5sc1nda7l54rjc0g5l1hamj09j-subversion-1.7.11’... On the other hand, if the signature is wrong, you get a message like NAR info file `http://cache.example.org/7dppcj5sc1nda7l54rjc0g5l1hamj09j.narinfo' has an invalid signature; ignoring Signatures are implemented as a single line appended to the NAR info file, which looks like this: Signature: 1;cache.example.org-1;HQ9Xzyanq9iV...muQ== Thus the signature has 3 fields: a version (currently "1"), the ID of key, and the base64-encoded signature of the SHA-256 hash of the contents of the NAR info file up to but not including the Signature line. Issue #75.
2014-01-06Revert "nix-shell: Set $IN_NIX_SHELL before evaluation"Eelco Dolstra
This reverts commit 0c1198cf08576f16633b2344dc6513cefb567cfc.
2013-12-30nix-shell --pure: Don't clear IN_NIX_SHELLShea Levy
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-12-20Revert "Scan /proc/<pid>/cmdline for GC roots"Eelco Dolstra
This reverts commit 194e3374b89b8b2dec6296923877304bdb5c6ae2. Checking the command line for GC roots means that $ nix-store --delete $path will fail because $path is now a root because it's mentioned on the command line.
2013-12-20Scan /proc/<pid>/cmdline for GC rootsEelco Dolstra
2013-12-20nix-shell: Don't warn about the lack of a GC rootEelco Dolstra
2013-12-20nix-shell: Set $IN_NIX_SHELL before evaluationEelco Dolstra
This has some hacky applications.
2013-12-20nix-shell: Handle --option correctlyEelco Dolstra
Fixes #181.
2013-12-17nix-shell --pure: Keep $TERMEelco Dolstra
2013-12-02Install bsdiff and bspatch in $(libexecdir)/nixEelco Dolstra