about summary refs log tree commit diff
path: root/doc/manual/advanced-topics
AgeCommit message (Collapse)AuthorFilesLines
2019-08-07 Merge pull request #2995 from tweag/post-build-hookEelco Dolstra2-0/+161
Add a post build hook
2019-08-06 post-build-hook: docs fixupGraham Christensen1-2/+5
2019-08-02 Add a post-build-hookregnat2-0/+158
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-07-19 docs: document balancing cores and max-jobsGraham Christensen2-0/+122
2019-05-12 diff hook: execute as the build user, and pass the temp dirGraham Christensen1-7/+5
2019-05-12 build: run diff-hook under --check and document diff-hookGraham Christensen2-0/+208
2019-03-31 docs: Mention `--max-jobs 0` to build remotely onlyNiklas Hambüchen1-0/+3
2019-03-16 Link to `builders-use-substitutes` in chapter on distributed buildsJoachim Breitner1-0/+4
fixes #2730.
2018-09-01 Merge pull request #2237 from nh2/patch-1Eelco Dolstra1-0/+1
manual: distributed-builds: Mention - as default
2018-08-31 docs: Add IDs to important sectionsGraham Christensen1-0/+1
2018-06-17 manual: distributed-builds: Mention - as defaultNiklas Hambüchen1-0/+1
2018-02-21 Manual: Update chapter on remote buildsEelco Dolstra1-67/+144
Alos add a command "nix ping-store" to make it easier to see if Nix can connect to a remote builder (e.g. 'nix ping-store --store ssh://mac').
2017-05-01 Remove $NIX_BUILD_HOOK and $NIX_CURRENT_LOADEelco Dolstra1-13/+2
This is to simplify remote build configuration. These environment variables predate nix.conf. The build hook now has a sensible default (namely build-remote). The current load is kept in the Nix state directory now.
2017-02-07 Remove perl dependency.Shea Levy1-5/+5
Fixes #341
2016-08-10 s/powerpc-darwin/x86_64-darwin/Domen Kožar1-4/+4
Let's step in line with time and document more realistic values.
2016-07-21 Grammar/spellingEelco Dolstra1-2/+2
2016-07-21 NIX_REMOTE_SYSTEMS path must be absolute (#957)Matthias Beyer1-1/+2
Once upon a time, I wrote my bachelors thesis about functional deployment mechanisms. I had to evaluate several szenarios where package management and deployment were relevant. One szenario was to do distributed builds over several machines. I told myself: Weee, nix can do this! And with nix, this is actually save, as you do not have side effects when building! So I started. I use a cloud to set up four virtual machines where I wanted to do the build. A fifth machine was used as master to distribute the builds. All was good. I created the necessary SSH keys, made sure every machine was reachable by the master and configured the build in my remotes.conf. When I started to try to build weechat from source, the build failed. It failed, telling me error: unable to start any build; either increase ‘--max-jobs’ or enable distributed builds And I started to dig around. I digged long and good. But I wasn't able to find the issue. I double and triple checked my environment variables, my settings, the SSH key and everything. I reached out to fellow Nixers by asking on the nixos IRC channel. And I got help. But we weren't able to find the issue, either. So I became frustrated. I re-did all the environment variables. And suddenly,... it worked! What did I change? Well... I made the environment variables which contained pathes contain absolute pathes rather than relatives. And because I like to share my knowledge, this should be put into the documentation, so others do not bang their heads against the wall because something is not documented somewhere.
2014-12-14 Rename filesEelco Dolstra2-0/+125