Nix on Travis: Difference between revisions
imported>Mic92 sandboxing |
imported>Erikarvstedt mNo edit summary |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Travis-CI provides a <code>language: nix</code> setting (to put in a ''.travis.yml'' file) to run continuous integration scripts on a machine with Nix installed. | Travis-CI provides a <code>language: nix</code> setting (to put in a ''.travis.yml'' file) to run continuous integration scripts on a machine with Nix installed. | ||
See [https://docs.travis-ci.com/user/languages/nix Travis-CI documentation for Nix]. | See [https://docs.travis-ci.com/user/languages/nix Travis-CI documentation for Nix], [https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/script/nix.rb Travis source code for Nix]. | ||
== Caching dependencies == | == Caching dependencies == | ||
Line 37: | Line 37: | ||
At the moment travis does not have a sandbox enabled by default. | At the moment travis does not have a sandbox enabled by default. | ||
This can lead to | This can lead to non-trivial to reproduce errors, | ||
when files from the travis image interfere with the build. | when files from the travis image interfere with the build. | ||
Enabling is straight-forward by using the following little snippet: | Enabling however is straight-forward by using the following little snippet: | ||
< | <syntaxHighlight lang=nix> | ||
before_script: | before_script: | ||
- sudo mkdir /etc/nix && echo 'sandbox = true' | sudo tee /etc/nix/nix.conf | - sudo mkdir -p /etc/nix && echo 'sandbox = true' | sudo tee /etc/nix/nix.conf | ||
</ | </syntaxHighlight> |