aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-10-30builtins.fetchGit: Return an attrset with revision infoEelco Dolstra
This adds rev, shortRev and revCount attributes, equal to what Hydra provides. E.g. $ nix eval '(fetchGit https://github.com/NixOS/patchelf.git)' { outPath = "/nix/store/ghigrkw02l440g8vfxa9wj4c3zpfmw99-source"; rev = "29c085fd9d3fc972f75b3961905d6b4ecce7eb2b"; revCount = 303; shortRev = "29c085f"; }
2017-10-30enable-http2 -> http2Eelco Dolstra
2017-10-30fetchgit -> fetchGitEelco Dolstra
Almost all other primops are camelCase so no reason not to use that here.
2017-10-30fetchTarball: Use "source" as the default nameEelco Dolstra
This ensures that it produces the same output as fetchgit: $ nix eval --raw '(builtins.fetchgit https://github.com/NixOS/patchelf.git)' /nix/store/ghigrkw02l440g8vfxa9wj4c3zpfmw99-source $ nix eval --raw '(fetchTarball https://github.com/NixOS/patchelf/archive/master.tar.gz)' /nix/store/ghigrkw02l440g8vfxa9wj4c3zpfmw99-source
2017-10-30fetchurl/fetchTarball: Respect name changesEelco Dolstra
The computation of urlHash didn't take the name into account, so subsequent fetchurl calls with the same URL but a different name would resolve to the same cached store path.
2017-10-30builtins.fetchgit: Don't mess up the progress indicatorEelco Dolstra
2017-10-30builtins.fetchgit: Support a "name" attributeEelco Dolstra
The "name" attribute defaults to "source", which we should use for all similar functions (e.g. fetchTarball and in Hydra) to ensure that we get a consistent store path regardless of how the tree is fetched. "source" is not necessarily a correct label, but using an empty name is problematic: you get an ugly store path ending in a dash, and it's impossible to have a fixed-output derivation that produces that path because ".drv" is not a valid store name. Fixes #904.
2017-10-29nix repl :t: Indicate strings that have a contextEelco Dolstra
2017-10-25Fix building on clangEelco Dolstra
https://hydra.nixos.org/build/62945761
2017-10-25exportReferencesGraph: Allow exporting a list of store pathsEelco Dolstra
2017-10-25Bump language versionEelco Dolstra
2017-10-25Fix exportReferencesGraph in the structured attrs caseEelco Dolstra
2017-10-25Pass lists/attrsets to bash as (associative) arraysEelco Dolstra
2017-10-24Add --store argument to legacy commandsEelco Dolstra
2017-10-24Allow shorter syntax for chroot storesEelco Dolstra
You can now say '--store /tmp/nix' instead of '--store local?root=/tmp/nix'.
2017-10-24More progress indicator improvementsEelco Dolstra
In particular, don't show superfluous "fetching path" and "building path(s)" messages, and show the current round (with --repeat).
2017-10-24More progress indicator improvementsEelco Dolstra
Fixes #1599.
2017-10-24Progress indicator: Show on what machine we're buildingEelco Dolstra
E.g. $ nix build nixpkgs.hello --builders 'root@wendy' [1/0/1 built] building hello-2.10 on ssh://root@wendy: checking for minix/config.h... no
2017-10-24build-remote: Work properly on a chrooted storeEelco Dolstra
2017-10-24Handle log messages from build-remoteEelco Dolstra
This makes the progress indicator show statuses like "connecting to 'root@machine'".
2017-10-24nix: Respect -I, --arg, --argstrEelco Dolstra
Also, random cleanup to argument handling.
2017-10-24Remove the remote-builds optionEelco Dolstra
This is superfluous since you can now just set "builders" to empty, e.g. "--builders ''".
2017-10-24Remove the builder-files optionEelco Dolstra
You can now include files via the "builders" option, using the syntax "@<filename>". Having only one option makes it easier to override builders completely. For backward compatibility, the default is "@/etc/nix/machines", or "@<filename>" for each file name in NIX_REMOTE_SYSTEMS.
2017-10-23Pass all settings to build-remoteEelco Dolstra
This ensures that command line flags such as --builders get passed correctly.
2017-10-23Turn $NIX_REMOTE into a configuration optionEelco Dolstra
2017-10-23build-remote: Put current load under the store state directoryEelco Dolstra
Fixes the error error: opening lock file '/nix/var/nix/current-load/main-lock': Permission denied when using a chroot store.
2017-10-20Merge pull request #1616 from copumpkin/separate-darwin-sandboxEelco Dolstra
Shift Darwin sandbox to separate installed files
2017-10-19nix-shell: Fix file name resolution in shebangsShea Levy
2017-10-19Revert "Let's not populate the NAR cache from hydra-queue-runner for now"Eelco Dolstra
This reverts commit 908590dc6cfcca3a98755b194d93b2da39aee95c. Since hydra-server can have a different store URI from hydra-queue-runner now, we don't really need this.
2017-10-18Let's not populate the NAR cache from hydra-queue-runner for nowEelco Dolstra
2017-10-18Errors writing to the NAR cache should not be fatalEelco Dolstra
2017-10-18Suppress "copying 0 paths" messageEelco Dolstra
2017-10-17Shift Darwin sandbox to separate installed filesDan Peebles
This makes it slightly more manageable to see at a glance what in a build's sandbox profile is unique to the build and what is standard. Also a first step to factoring more of our Darwin logic into scheme functions that will allow us a bit more flexibility. And of course less of that nasty codegen in C++! 😀
2017-10-17BinaryCacheStore::addToStore(): Add NARs to the local cacheEelco Dolstra
2017-10-17BinaryCacheStore: Support local caching of NARsEelco Dolstra
This speeds up commands like "nix cat-store". For example: $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nar-cache /nix/store/i60yncmq6w9dyv37zd2k454g0fkl3arl-systemd-234/etc/udev/udev.conf real 0m4.336s $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nar-cache /nix/store/i60yncmq6w9dyv37zd2k454g0fkl3arl-systemd-234/etc/udev/udev.conf real 0m0.045s The primary motivation is to allow hydra-server to serve files from S3 binary caches. Previously Hydra had a hack to do "nix-store -r <path>", but that fetches the entire closure so is prohibitively expensive. There is no garbage collection of the NAR cache yet. Also, the entire NAR is read when accessing a single member file. We could generate the NAR listing to provide random access. Note: the NAR cache is indexed by the store path hash, not the content hash, so NAR caches should not be shared between binary caches, unless you're sure that all your builds are binary-reproducible.
2017-10-17Remove BinaryCacheStoreAccessorEelco Dolstra
Probably as a result of a bad merge in 4b8f1b0ec066a5b994747b1afd050f5f62d857f6, we had both a BinaryCacheStoreAccessor and a RemoteFSAccessor. BinaryCacheStore::getFSAccessor() returned the latter, but BinaryCacheStore::addToStore() checked for the former. This probably caused hydra-queue-runner to download paths that it just uploaded.
2017-10-17fetchgit: Remove incomplete/unneeded ref check.Shea Levy
This check fails for tags and branches, and is made redundant by the checks git itself will do when fetching the repo.
2017-10-16fetchgit: Remove incomplete/unneeded isURI check.Shea Levy
This check spuriously fails for e.g. git@github.com:NixOS/nixpkgs.git, and even for ssh://git@github.com/NixOS/nixpkgs.git, and is made redundant by the checks git itself will do when fetching the repo. We instead pass a -- before passing the URI to git to avoid injection.
2017-10-12Add option to disable the seccomp filterEelco Dolstra
I needed this to test ACL/xattr removal in canonicalisePathMetaData(). Might also be useful if you need to build old Nixpkgs that doesn't have the required patches to remove setuid/setgid creation.
2017-10-12Merge pull request #1571 from teto/improve_priority_msgEelco Dolstra
Improve error message for conflicting priorities
2017-10-12Merge pull request #1580 from copumpkin/retry-after-timeoutEelco Dolstra
Retry in all error cases but a few
2017-10-09Fix a hang in ThreadPoolEelco Dolstra
The worker threads could exit prematurely if they finished processing all items while the main thread was still adding items. In particular, this caused hanging nix-store --serve processes in the build farm. Also, process items from the main thread.
2017-10-02Reverse retry logic to retry in all but a few casesDan Peebles
It was getting too much like whac-a-mole listing all the retriable error conditions, so we now retry by default and list the cases where retrying is almost certainly hopeless.
2017-09-28nix run: Restore signalsEelco Dolstra
Otherwise Ctrl-C doesn't work.
2017-09-27nix copy: make recursive by defaultEelco Dolstra
2017-09-27Tweak messageEelco Dolstra
2017-09-27nix build: Fix realising a store pathEelco Dolstra
2017-09-25nix why-depends: Write to stdoutEelco Dolstra
2017-09-25Add "nix show-derivation"Eelco Dolstra
This debug command prints a store derivation in JSON format. For example: $ nix show-derivation nixpkgs.hello { "/nix/store/ayjwpwwiyy04nh9z71rsdgd3q7bra7ch-hello-2.10.drv": { "outputs": { "out": { "path": "/nix/store/w5w4v29ql0qwqhczkdxs94ix2lh7ibgs-hello-2.10" } }, "inputSrcs": [ "/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh" ], "inputDrvs": { "/nix/store/13839aqdf6x4k3b785rw5f2l7857l6y3-bash-4.4-p12.drv": [ "out" ], "/nix/store/vgdx7fdc7d4iirmnwj2py1nrvr5qwzj7-hello-2.10.tar.gz.drv": [ "out" ], "/nix/store/x3kkd0vsqfflbvwf1055l9mr39bg0ms0-stdenv.drv": [ "out" ] }, "platform": "x86_64-linux", "builder": "/nix/store/qp5fw57d38bd1n07ss4zxh88zg67c3vg-bash-4.4-p12/bin/bash", "args": [ "-e", "/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh" ], "env": { "buildInputs": "", "builder": "/nix/store/qp5fw57d38bd1n07ss4zxh88zg67c3vg-bash-4.4-p12/bin/bash", "configureFlags": "", "doCheck": "1", "name": "hello-2.10", "nativeBuildInputs": "", "out": "/nix/store/w5w4v29ql0qwqhczkdxs94ix2lh7ibgs-hello-2.10", "propagatedBuildInputs": "", "propagatedNativeBuildInputs": "", "src": "/nix/store/3x7dwzq014bblazs7kq20p9hyzz0qh8g-hello-2.10.tar.gz", "stdenv": "/nix/store/6zngq1rdh0ans9qyckqimqibgnlvlfrm-stdenv", "system": "x86_64-linux" } } } This removes the need for pp-aterm.
2017-09-25DohEelco Dolstra