aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-27nix-daemon.service: add install section.Piotr Szubiakowski
Signed-off-by: Piotr Szubiakowski <pszubiak@eso.org>
2019-08-24Merge pull request #2946 from vmandela/proxyGraham Christensen
installer: handle network proxy in systemd multi-user install
2019-08-24docs: document the installer's use of proxy env varsGraham Christensen
2019-08-24installer: handle network proxy in systemd installVenkateswara Rao Mandela
If a network proxy configuration is detected, setup an override systemd unit file for nix-daemon service with the non-empty proxy variables. Proxy detection is performed by looking for http/https/ftp proxy and no proxy variables in user environment
2019-08-16Merge pull request #3041 from zimbatm/nix-store-error-13Eelco Dolstra
Fix for `unknown serve command 13`
2019-08-16nix-store: fix out of sync protocolzimbatm
If a NAR is already in the store, addToStore doesn't read the source which makes the protocol go out of sync. This happens for example when two client try to nix-copy-closure the same derivation at the same time.
2019-08-16libutil: add SizedSourcezimbatm
Introduce the SizeSource which allows to bound how much data is being read from a source. It also contains a drainAll() function to discard the rest of the source, useful to keep the nix protocol in sync.
2019-08-15Merge pull request #2945 from danidiaz/doc001Eelco Dolstra
Expanded documentation for .nix-defexpr
2019-08-15Merge pull request #2782 from grahamc/flamesEelco Dolstra
Track function start and end
2019-08-15Expanded documentation for .nix-defexprDaniel Diaz
2019-08-14Track function start and ends for flame graphsGraham Christensen
With this patch, and this file I called `log.py`: #!/usr/bin/env nix-shell #!nix-shell -i python3 -p python3 --pure import sys from pprint import pprint stack = [] timestack = [] for line in open(sys.argv[1]): components = line.strip().split(" ", 2) if components[0] != "function-trace": continue direction = components[1] components = components[2].rsplit(" ", 2) loc = components[0] _at = components[1] time = int(components[2]) if direction == "entered": stack.append(loc) timestack.append(time) elif direction == "exited": dur = time - timestack.pop() vst = ";".join(stack) print(f"{vst} {dur}") stack.pop() and: nix-instantiate --trace-function-calls -vvvv ../nixpkgs/pkgs/top-level/release.nix -A unstable > log.matthewbauer 2>&1 ./log.py ./log.matthewbauer > log.matthewbauer.folded flamegraph.pl --title matthewbauer-post-pr log.matthewbauer.folded > log.matthewbauer.folded.svg I can make flame graphs like: http://gsc.io/log.matthewbauer.folded.svg --- Includes test cases around function call failures and tryEval. Uses RAII so the finish is always called at the end of the function.
2019-08-08Merge pull request #3031 from grahamc/low-speed-limitEelco Dolstra
conf: stalled-download-timeout: make tunable
2019-08-08conf: stalled-download-timeout: make tunableGraham Christensen
Make curl's low speed limit configurable via stalled-download-timeout. Before, this limit was five minutes without receiving a single byte. This is much too long as if the remote end may not have even acknowledged the HTTP request.
2019-08-08tests/post-hook.sh: Don't put result link in cwdEelco Dolstra
2019-08-08Rename file for consistencyEelco Dolstra
2019-08-07Merge pull request #3030 from dtzWill/fix/missing-include-ocloexecEelco Dolstra
pathlocks: add include to fcntl.h for O_CLOEXEC
2019-08-07fixup: docs for post-build-hookGraham Christensen
2019-08-07Merge pull request #2995 from tweag/post-build-hookEelco Dolstra
Add a post build hook
2019-08-07pathlocks: add include to fcntl.h for O_CLOEXECWill Dietz
2019-08-06post-build-hook: docs fixupGraham Christensen
2019-08-02nix-store --verify: Don't repair while holding the GC lockEelco Dolstra
2019-08-02SimplifyEelco Dolstra
With BSD locks we don't have to guard against reading our own temproots.
2019-08-02Use BSD instead of POSIX file locksEelco Dolstra
POSIX file locks are essentially incompatible with multithreading. BSD locks have much saner semantics. We need this now that there can be multiple concurrent LocalStore::buildPaths() invocations.
2019-08-02Add a test for auto-GCEelco Dolstra
This currently fails because we're using POSIX file locks. So when the garbage collector opens and closes its own temproots file, it causes the lock to be released and then deleted by another GC instance.
2019-08-02Add a post-build-hookregnat
Passing `--post-build-hook /foo/bar` to a nix-* command will cause `/foo/bar` to be executed after each build with the following environment variables set: DRV_PATH=/nix/store/drv-that-has-been-built.drv OUT_PATHS=/nix/store/...build /nix/store/...build-bin /nix/store/...build-dev This can be useful in particular to upload all the builded artifacts to the cache (including the ones that don't appear in the runtime closure of the final derivation or are built because of IFD). This new feature prints the stderr/stdout output to the `nix-build` and `nix build` client, and the output is printed in a Nix 2 compatible format: [nix]$ ./inst/bin/nix-build ./test.nix these derivations will be built: /nix/store/ishzj9ni17xq4hgrjvlyjkfvm00b0ch9-my-example-derivation.drv building '/nix/store/ishzj9ni17xq4hgrjvlyjkfvm00b0ch9-my-example-derivation.drv'... hello! bye! running post-build-hook '/home/grahamc/projects/github.com/NixOS/nix/post-hook.sh'... post-build-hook: + sleep 1 post-build-hook: + echo 'Signing paths' /nix/store/qr213vjmibrqwnyp5fw678y7whbkqyny-my-example-derivation post-build-hook: Signing paths /nix/store/qr213vjmibrqwnyp5fw678y7whbkqyny-my-example-derivation post-build-hook: + sleep 1 post-build-hook: + echo 'Uploading paths' /nix/store/qr213vjmibrqwnyp5fw678y7whbkqyny-my-example-derivation post-build-hook: Uploading paths /nix/store/qr213vjmibrqwnyp5fw678y7whbkqyny-my-example-derivation post-build-hook: + sleep 1 post-build-hook: + printf 'very important stuff' /nix/store/qr213vjmibrqwnyp5fw678y7whbkqyny-my-example-derivation [nix-shell:~/projects/github.com/NixOS/nix]$ ./inst/bin/nix build -L -f ./test.nix my-example-derivation> hello! my-example-derivation> bye! my-example-derivation (post)> + sleep 1 my-example-derivation (post)> + echo 'Signing paths' /nix/store/c263gzj2kb2609mz8wrbmh53l14wzmfs-my-example-derivation my-example-derivation (post)> Signing paths /nix/store/c263gzj2kb2609mz8wrbmh53l14wzmfs-my-example-derivation my-example-derivation (post)> + sleep 1 my-example-derivation (post)> + echo 'Uploading paths' /nix/store/c263gzj2kb2609mz8wrbmh53l14wzmfs-my-example-derivation my-example-derivation (post)> Uploading paths /nix/store/c263gzj2kb2609mz8wrbmh53l14wzmfs-my-example-derivation my-example-derivation (post)> + sleep 1 my-example-derivation (post)> + printf 'very important stuff' [1 built, 0.0 MiB DL] Co-authored-by: Graham Christensen <graham@grahamc.com> Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2019-08-02Tweak min-free/max-free descriptionsEelco Dolstra
2019-07-30Merge pull request #3009 from codedownio/add-pname-and-version-to-jsonEelco Dolstra
Add pname and version to nix-env -q --json
2019-07-30Merge pull request #3013 from basvandijk/disable-lsof-for-darwin-testsEelco Dolstra
Disable findRuntimeRoots on darwin when running tests because lsof is slow
2019-07-30Merge pull request #3012 from basvandijk/fix-pathExistsEelco Dolstra
Allow builtins.pathExists to check the existence of /nix/store paths
2019-07-30Disable findRuntimeRoots on darwin when running tests because lsof is slowBas van Dijk
See: https://github.com/NixOS/nix/issues/3011
2019-07-30Allow builtins.pathExists to check the existence of /nix/store pathsBas van Dijk
This makes it consitent with builtins.readDir.
2019-07-27Add pname and version to nix-env -q --jsonTom McLaughlin
2019-07-25Merge pull request #3008 from matthewbauer/fix-typoEelco Dolstra
Use $HOME instead of $USER
2019-07-25Merge pull request #3007 from matthewbauer/add-user-defaultEelco Dolstra
Add default for USER when unset
2019-07-25Use $HOME instead of $USERMatthew Bauer
$USER/.nix-profile will not be a path. I think $HOME/.nix-profile was the origininal intent. /cc @Grahamc
2019-07-25Add default for USER when unsetMatthew Bauer
uses $(id -u -n) when USER is unset, this is needed on some weird setups in Docker. Fixes #971
2019-07-23Merge pull request #3004 from zimbatm/shared-fundingDomen Kožar
Remove .github/FUNDING.yml
2019-07-23Remove .github/FUNDING.ymlzimbatm
The configuration is now done through the shared configuration repo: https://github.com/nixos/.github
2019-07-19Merge pull request #2749 from grahamc/docs-cores-max-jobsEelco Dolstra
docs: document balancing cores and max-jobs
2019-07-19docs: document balancing cores and max-jobsGraham Christensen
2019-07-18Add Open CollectiveDomen Kožar
2019-07-13Merge pull request #2975 from matthewbauer/fix-nsswitch-issueEelco Dolstra
Don’t use entire /etc/nsswitch.conf file
2019-07-10Resume NAR downloadsEelco Dolstra
This is a much simpler fix to the 'error 9 while decompressing xz file' problem than 78fa47a7f08a4cb6ee7061bf0bd86a40e1d6dc91. We just do a ranged HTTP request starting after the data that we previously wrote into the sink. Fixes #2952, #379.
2019-07-10HttpBinaryCacheStore: Use default number of retries for NARsEelco Dolstra
2019-07-10Downloader: Use warn()Eelco Dolstra
2019-07-10Revert "Fix 'error 9 while decompressing xz file'"Eelco Dolstra
This reverts commit 78fa47a7f08a4cb6ee7061bf0bd86a40e1d6dc91.
2019-07-10nix copy: Rename --substitute to --substitute-on-destinationEelco Dolstra
'--substitute' was being shadowed by the regular '--substitute' (the short-hand for '--option substitute true'). Fixes #2983.
2019-07-06Merge pull request #2882 from grahamc/docs/1115-tarball-ttlEelco Dolstra
tarball-ttl: document
2019-07-05tarball-ttl: documentGraham Christensen
Incorporates text from Niklas Hambüchen in #2978 Closes #1115
2019-07-05Revert 82b7f0e840983879a510245903ff7c917276f65d, ↵Eelco Dolstra
cd8bc06e8786018ddb16cea4cb10971b63d0efd2, c3db9e6f8fd06d691be04cdd95a6bb21a400481d This breaks the tarball job: https://hydra.nixos.org/build/95714570