aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-15Merge pull request #3458 from zimbatm/nix-user-conf-dirEelco Dolstra
NIX_USER_CONF_FILES
2020-04-14add NIX_USER_CONF_FILESzimbatm
Motivation: maintain project-level configuration files. Document the whole situation a bit better so that it corresponds to the implementation, and add NIX_USER_CONF_FILES that allows overriding which user files Nix will load during startup.
2020-04-12Merge pull request #3488 from LnL7/darwin-tmpdirEelco Dolstra
never use /var/folders for TMPDIR on darwin
2020-04-12never use /var/folders for TMPDIR on darwinDaiderd Jordan
This doesn't just cause problems for nix-store --serve but also results in certain build failures. Builds that use unix domain sockets in their tests often fail because the /var/folders prefix already consumes more than half of the maximum length of socket paths. struct sockaddr_un { sa_family_t sun_family; /* AF_UNIX */ char sun_path[108]; /* Pathname */ };
2020-04-11Merge pull request #2688 from tollb/fix/build_check_keep_failed_sandbox_permsDomen Kožar
Fix nix-build --check -K in sandbox w/o root
2020-04-11Merge pull request #3447 from DavHau/improve-tofile-error-msgDomen Kožar
improve toFile error message when containing potential drv path
2020-04-11improve toFile error message when containing potential drv pathDavHau
2020-04-10Add test case for temporary directories on darwinBruce Toll
A test case for correct handling of temporary directory deletion that was added to check.sh as part of PR #2689 was initially disabled for Darwin because of a directory permission issue in PR #2688. Now that the issue in PR #2688 is fixed, this commit enables the test case for Darwin.
2020-04-10Fix nix-build --check -K in sandbox w/o rootBruce Toll
Temporarily add user-write permission to build directory so that it can be moved out of the sandbox to the store with a .check suffix. This is necessary because the build directory has already had its permissions set read-only, but write permission is required to update the directory's parent link to move it out of the sandbox. Updated the related --check "derivation may not be deterministic" messages to consistently use the real store paths. Added test for non-root sandbox nix-build --check -K to demonstrate issue and help prevent regressions.
2020-04-10Update release scriptEelco Dolstra
2020-04-10Merge pull request #2689 from tollb/fix/delete_tmp_dir_when_build_check_okDomen Kožar
Delete temporary directory on successful build
2020-04-09Delete temporary directory on successful buildBruce Toll
With --check and the --keep-failed (-K) flag, the temporary directory was being retained regardless of whether the build was successful and reproducible. This removes the temporary directory, as expected, on a reproducible check build. Added tests to verify that temporary build directories are not retained unnecessarily, particularly when using --check with --keep-failed.
2020-04-09Merge pull request #3482 from pmiddend/ignore-hidden-files-in-temprootsEelco Dolstra
gc.cc: Ignore hidden files in temproots
2020-04-09gc.cc: Ignore hidden files in temprootsPhilipp Middendorf
2020-04-09README: add github actions badgeDomen Kožar
2020-04-09remote .travis.yml as we migrated to github actionsDomen Kožar
2020-04-09Attach pos to if expression errorsDomen Kožar
2020-04-09Merge pull request #3476 from knl/rename-download-to-filetransferDomen Kožar
Rename download to filetransfer
2020-04-08after flake rebaseNikola Knezevic
2020-04-08datatransfer.{cc,hh} -> filetransfer.{cc,hh}Nikola Knezevic
2020-04-08DataTransfer -> FileTransferNikola Knezevic
2020-04-08Add upload methodNikola Knezevic
2020-04-08actDownload -> actDataTransferNikola Knezevic
2020-04-08DownloadError -> DataTransferErrorNikola Knezevic
2020-04-08DownloadItem -> TransferItemNikola Knezevic
2020-04-08{get,make,new}Downloader -> DataTransferNikola Knezevic
2020-04-08enqueueDownload -> enqueueDataTransferNikola Knezevic
2020-04-08DownloadResult -> DataTransferResultNikola Knezevic
2020-04-08DownloadSettings -> DataTransferSettingsNikola Knezevic
2020-04-08Rename src/lib/download.* to src/lib/datatransfer.*Nikola Knezevic
2020-04-08DownloadRequest -> DataTransferRequestNikola Knezevic
2020-04-08Merge pull request #3477 from Ninlives/nix-run-using-envEelco Dolstra
`nix run` using $SHELL as default command
2020-04-08build.cc: improve message if home directory existsDomen Kožar
2020-04-08Merge pull request #3478 from edolstra/ignore-failed-dataEelco Dolstra
Downloader: Only write data to the sink on a 200 response
2020-04-08Merge pull request #3468 from Infinisil/functionArgsPositionsEelco Dolstra
Make function arguments retain position info
2020-04-08Downloader: Only write data to the sink on a 200 responseEelco Dolstra
Hopefully fixes #3278.
2020-04-07`nix run` using $SHELL as default commandmlatus
2020-04-07Merge branch 'fetchgit-recursive' of https://github.com/blitz/nixEelco Dolstra
2020-04-07Merge pull request #3459 from NixOS/fetchersEelco Dolstra
Backport libfetchers from the flakes branch
2020-04-07CleanupEelco Dolstra
2020-04-07Add FIXMEEelco Dolstra
(cherry picked from commit 2f494531b7811b45f6b76787f225495a14d28a7f)
2020-04-07PathInput: Add some methodsEelco Dolstra
(cherry picked from commit 78ad5b3d91507427fa563f3474dc52da608ad224)
2020-04-07Respect the narHash attribute in more input typesEelco Dolstra
(cherry picked from commit a6ff66b658b61aef80d936f0183447fe4cb46000)
2020-04-07Add 'path' fetcherEelco Dolstra
This fetchers copies a plain directory (i.e. not a Git/Mercurial repository) to the store (or does nothing if the path is already a store path). One use case is to pin the 'nixpkgs' flake used to build the current NixOS system, and prevent it from being garbage-collected, via a system registry entry like this: { "from": { "id": "nixpkgs", "type": "indirect" }, "to": { "type": "path", "path": "/nix/store/rralhl3wj4rdwzjn16g7d93mibvlr521-source", "lastModified": 1585388205, "rev": "b0c285807d6a9f1b7562ec417c24fa1a30ecc31a" }, "exact": true } Note the fake "lastModified" and "rev" attributes that ensure that the flake gives the same evaluation results as the corresponding Git/GitHub inputs. (cherry picked from commit 12f9379123eba828f2ae06f7978a37b7045c2b23)
2020-04-07Backport libfetchers from the flakes branchEelco Dolstra
This provides a pluggable mechanism for defining new fetchers. It adds a builtin function 'fetchTree' that generalizes existing fetchers like 'fetchGit', 'fetchMercurial' and 'fetchTarball'. 'fetchTree' takes a set of attributes, e.g. fetchTree { type = "git"; url = "https://example.org/repo.git"; ref = "some-branch"; rev = "abcdef..."; } The existing fetchers are just wrappers around this. Note that the input attributes to fetchTree are the same as flake input specifications and flake lock file entries. All fetchers share a common cache stored in ~/.cache/nix/fetcher-cache-v1.sqlite. This replaces the ad hoc caching mechanisms in fetchGit and download.cc (e.g. ~/.cache/nix/{tarballs,git-revs*}). This also adds support for Git worktrees (c169ea59049f861aaba429f48b828d0820b74d1d).
2020-04-06Merge pull request #3474 from cole-h/error-on-unsupported-protocolEelco Dolstra
Don't retry on "unsupported protocol" error
2020-04-05Don't retry on "unsupported protocol" errorCole Helbling
When encountering an unsupported protocol, there's no need to retry. Chances are, it won't suddenly be supported between retry attempts; error instead. Otherwise, you see something like the following: $ nix-env -i -f git://git@github.com/foo/bar warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 335 ms warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 604 ms warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 1340 ms warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 2685 ms With this change, you now see: $ nix-env -i -f git://git@github.com/foo/bar error: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1)
2020-04-03Publish a tarball containing the crates we depend onEelco Dolstra
This is needed since we no longer produce a source tarball. (cherry picked from commit bf70a047a0b2da606f65a88f13ce2994065cd9c4)
2020-04-03nix-env: Refuse to operate on a new-style profileEelco Dolstra
This prevents users from accidentally nuking their profile via nix-env. (cherry picked from commit 021634e3e3edb327089d33ab41b743f0a40126da)
2020-04-03Merge pull request #3470 from andir/remove-unusued-attrErrorEelco Dolstra
libexpr: remove unused attrError