aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2016-02-19Merge branch 'master' of git://github.com/stepcut/nixShea Levy
2016-02-16Add C++ functions for .narinfo processing / signingEelco Dolstra
This is currently only used by the Hydra queue runner rework, but like eff5021eaa6dc69f65ea1a8abe8f3ab11ef5eb0a it presumably will be useful for the C++ rewrite of nix-push and download-from-binary-cache. (@shlevy)
2016-02-16nix-profile.sh.in: find ca-bundle.pem on openSUSE Tumbleweed machinesPeter Simons
2016-02-12nix-profile.sh.in: quote use of $HOME in shell argumentsPeter Simons
All other places in the script do this already, so let's be consistent.
2016-02-10Check shell profile is writeable before modifyingAlex Cruice
The `set -e` at the top of the script causes the installation to fail to complete if the shell profile is not writeable. Checking file existence only is not enough.
2016-01-20Fix broken call to shellwordsBrian McKenna
nix-shell shebangs were broken by 9018deab
2016-01-05Verify TLS certificate before downloading binariesPhilip Potter
The --insecure flag to curl tells curl not to bother checking if the TLS certificate presented by the server actually matches the hostname requested, and actually is issued by a trusted CA chain. This almost entirely negates any benefit from using TLS in the first place. This removes the --insecure flag to ensure we actually have a secure connection to the intended hostname before downloading binaries. Manually tested locally within a dev-shell; was able to download binaries from https://cache.nixos.org without issue. [Note: --insecure was only used for fetching NARs, whose integrity is verified by Nix anyway using the hash from the .narinfo. But if we can fetch the .narinfo without --insecure, we can also fetch the .nar, so there is not much point to using --insecure. --Eelco]
2016-01-05propagate NIX_BUILD_SHELL also in pure builds document NIX_BUILD_SHELL in ↵Fabian Schmitthenner
the nix-shell command documentation
2015-12-07Use shellwords for nix-shell shebangBrian McKenna
Previously we can't have quoted arguments. This now allows us to use things like `ghcWithPackages`
2015-12-06Clarify installation error message that is shown when /nix/store exists but ↵Jeremy Shaw
is not writable by the user
2015-11-25Set default binary-caches-parallel-connections to 25Eelco Dolstra
Some benchmarking suggested this as a good value. Running $ benchmark -f ... -t 25 -- sh -c 'rm -f /nix/var/nix/binary-cache*; nix-store -r /nix/store/x5z8a2yvz8h6ccmhwrwrp9igg03575jg-nixos-15.09.git.5fd87e1M.drv --dry-run --option binary-caches-parallel-connections <N>' gave the following mean elapsed times for these values of N: N=10: 3.3541 N=20: 2.9320 N=25: 2.6690 N=30: 2.9417 N=50: 3.2021 N=100: 3.5718 N=150: 4.2079 Memory usage is also reduced (N=150 used 186 MB, N=25 only 68 MB). Closes #708.
2015-11-21reintroduce host deps in tandem with sandbox profilesJude Taylor
2015-11-10Fix bad characters in "copying 7 missing paths from ..."Eelco Dolstra
2015-10-21resolve-system-dependencies.pl: Simplify union implShea Levy
Patch by @pikajude
2015-10-21appropriately handle lock acquisition failures in resolve-system-dependencies.plJude Taylor
2015-10-21Add resolve-system-dependencies.plJude Taylor
2015-10-01nix-prefetch-url: Rewrite in C++Eelco Dolstra
2015-09-25Also set CURLOPT_SSL_VERIFYHOST=0 when "verify-https-binary-caches" is falseUtku Demir
This makes that option even more insecure, by also not checking the SSL host. But without this parameter, one can still get SSL errors even when "verify-https-binary-caches" is false, which is unexpected IMO.
2015-08-07Drop newline in error messageEelco Dolstra
2015-07-20nix-copy-closure: Add -v flagEelco Dolstra
And make exportPath() less spammy by default.
2015-07-01Revert "add the manpath to the installer"Eelco Dolstra
This reverts commit 76f985b92d95fef967c1f3193d05244ced15420b. We shouldn't mess with $MANPATH, because on some "man" implementations (like NixOS'), the default value on $MANPATH is derived from $PATH. So if you set $MANPATH, you lose the default locations.
2015-06-12nix-channel: Fix bogus error message caused by ↵Eelco Dolstra
8a84bd8c8bda1e4c6764c10ecdef9d74e4884800
2015-06-08nix-push: Support -jEelco Dolstra
Fixes #548.
2015-06-08Update cacert locationsEelco Dolstra
2015-06-04copy-from-other-stores: Use cpEelco Dolstra
2015-06-03NamingEelco Dolstra
2015-06-01nix-shell: Support multiple "#! nix-shell" linesEelco Dolstra
2015-05-21nix-shell: Barf if -p and -E are both usedEelco Dolstra
Closes #454, #455.
2015-05-05nix-shell: Fix uninitialized value warningEelco Dolstra
2015-04-27Merge branch 'nix-channel-tarballs' of git://github.com/copumpkin/nixShea Levy
2015-04-22nix-collect-garbage: translate to C++Luca Bruno
2015-04-20Support tarballs in nix channel URLsDan Peebles
2015-04-12add the manpath to the installerMichael Merickel
2015-03-04Reduce verbosity in build-remote.plEelco Dolstra
2015-02-22Merge branch 'gh-476-fix-install-script' of git://github.com/jramnani/nixShea Levy
sometimes cd prints to stdout
2015-02-19FIXMEsEelco Dolstra
2015-02-18Escape arguments to nix-shell #! scriptsEelco Dolstra
2015-02-18Support passing command line arguments to nix-shell #! scriptsEelco Dolstra
2015-02-18Fix nix-shell shebang scripts if -p is usedEelco Dolstra
2015-02-17Include NAR size in fingerprint computationEelco Dolstra
This is not strictly needed for integrity (since we already include the NAR hash in the fingerprint) but it helps against endless data attacks [1]. (However, this will also require download-from-binary-cache.pl to bail out if it receives more than the specified number of bytes.) [1] https://isis.poly.edu/~jcappos/papers/cappos_mirror_ccs_08.pdf
2015-02-11Nix install script failed when "cd" printed to stdout.Jeff Ramnani
In some cases the bash builtin command "cd" can print the variable $CWD to stdout. This caused the install script to fail while copying files because the source path was wrong. Fixes #476.
2015-02-08nix-build: Respect -Q during evaluationShea Levy
Fixes #474
2015-02-04Sign a subset of the .narinfoEelco Dolstra
We only need to sign the store path, NAR hash and references (the "fingerprint"). Everything else is irrelevant to security. For instance, the compression algorithm or the hash of the compressed NAR don't matter as long as the contents of the uncompressed NAR are correct. (Maybe we should include derivers in the fingerprint, but they're broken and nobody cares about them. Also, it might be nice in the future if .narinfos contained signatures from multiple independent signers. But that's impossible if the deriver is included in the fingerprint, since everybody will tend to have a different deriver for the same store path.) Also renamed the "Signature" field to "Sig" since the format changed in an incompatible way.
2015-02-04Use libsodium instead of OpenSSL for binary cache signingEelco Dolstra
Sodium's Ed25519 signatures are much shorter than OpenSSL's RSA signatures. Public keys are also much shorter, so they're now specified directly in the nix.conf option ‘binary-cache-public-keys’. The new command ‘nix-store --generate-binary-cache-key’ generates and prints a public and secret key.
2015-01-30nix-install-package: follow symlinksJaka Hudoklin
2015-01-28Moves runHook to a later execution positionOliver Dunkl
It moves runHook to a later position in the rcfile. After that we are able to set the PS1 environment-variable for a nix-shell environment e.g.: # turn the color of the prompt to blue shellHook = '' export PS1="\n\[\033[1;34m\][\u@\h:\w]$\[\033[0m\] "; '';
2015-01-15Shut up "Wide character in print" warning in copy-from-other-stores.plEelco Dolstra
2015-01-15Set correct user agent for NAR downloads from binary cachesEelco Dolstra
2015-01-08nix-shell: Add --run flagEelco Dolstra
‘--run’ is like ‘--command’, except that it runs the command in a non-interactive shell. This is important if you do things like: $ nix-shell --command make Hitting Ctrl-C while make is running drops you into the interactive Nix shell, which is probably not what you want. So you can now do $ nix-shell --run make instead.
2015-01-08nix-shell: Interpret filenames relative to the #!-scriptEelco Dolstra
So you can have a script like: #! /usr/bin/env nix-shell #! nix-shell script.nix -i python import prettytable x = prettytable.PrettyTable(["Foo", "Bar"]) for i in range(1, 10): x.add_row([i, i**2]) print x with a ‘script.nix’ in the same directory: with import <nixpkgs> {}; runCommand "dummy" { buildInputs = [ python pythonPackages.prettytable ]; } "" (Of course, in this particular case, using the ‘-p’ flag is more convenient.)