Compare commits

...

22 commits

Author SHA1 Message Date
Qyriad a88f3e4510 document for nix-instantiate too 2024-05-21 14:39:51 -06:00
Qyriad 36912b3b45 docs: document lookupFileArg syntax command refs
Change-Id: Ib6d68594a16132805ba5d97526e16f7b3633117e
2024-05-21 14:39:25 -06:00
Qyriad 09ebcff373 better commit msg for PHONEY internal-api-docs 2024-05-21 12:44:58 -06:00
Qyriad 5c6d4f903c docs: linkify nix3-build mention in nix-build.md
Change-Id: I462a8cf0da42b5045ce84b48dc1841ecdccbb89e
2024-05-21 12:43:56 -06:00
Qyriad 1796c9fb20 docs: document lookupFileArg syntax in nix-build
Change-Id: Ib6d68594a16132805ba5d97526e16f7b3633117e
2024-05-21 12:43:56 -06:00
Qyriad cab1fb0b05 build: make internal-api-docs PHONEY
Since we're skipping Meson's dependency tracking, for the
internal-api-docs custom target, we should just consider it a phoney
target and build it on every request.

Change-Id: I3b0bcea30ee9a4830023ccc5bededf995e96cccc
2024-05-21 12:43:56 -06:00
Qyriad a263a1fd5a maybe? 2024-05-21 12:35:09 -06:00
Qyriad d45deb373c docs: document lookupFileArg syntax in nix-build
Change-Id: Ib6d68594a16132805ba5d97526e16f7b3633117e
2024-05-21 12:34:14 -06:00
Qyriad 5b31d71f6f cleanup lookupFileArg
Change-Id: I2acd56e7a542b12138f43c95af78fdd50e944619
2024-05-21 12:34:13 -06:00
Qyriad 1818752c5c docs: linkify nix3-build mention in nix-build.md
Change-Id: I462a8cf0da42b5045ce84b48dc1841ecdccbb89e
2024-05-21 12:34:13 -06:00
Qyriad 7424fe910a add docstring to lookupFileArg
Change-Id: Ifc149764f5a15725d3d630677c6da29def4b0f3e
2024-05-21 12:34:13 -06:00
Qyriad 2bc2688b04 build: make internal-api-docs PHONEY
Change-Id: I3b0bcea30ee9a4830023ccc5bededf995e96cccc
2024-05-21 12:34:13 -06:00
Qyriad 590884e7a0 add libcmd test for lookupFileArg
Change-Id: I9e2ef170ffe916f902daec8b5630d29434c5d5f2
2024-05-21 12:34:12 -06:00
Qyriad ae355b8f42 repl: log errors writing to history file
These errors are now logged and explicitly ignored, rather than
implicitly ignored.

Change-Id: Ia26015466a17f2b11952df5317a4d150d79dc184
2024-05-21 12:34:12 -06:00
Qyriad b8cbf0707f minor tweak to the test 2024-05-21 12:33:13 -06:00
Qyriad 222000f908 docs: document lookupFileArg syntax in nix-build
Change-Id: Ib6d68594a16132805ba5d97526e16f7b3633117e
2024-05-21 12:33:01 -06:00
Qyriad de180c0356 docs: linkify nix3-build mention in nix-build.md
Change-Id: I462a8cf0da42b5045ce84b48dc1841ecdccbb89e
2024-05-21 12:33:01 -06:00
Qyriad 53dea1c06e build: make internal-api-docs PHONEY
Change-Id: I3b0bcea30ee9a4830023ccc5bededf995e96cccc
2024-05-21 12:33:01 -06:00
Qyriad 1e0ca2d55e cleanup lookupFileArg
Change-Id: I2acd56e7a542b12138f43c95af78fdd50e944619
2024-05-21 12:33:01 -06:00
Qyriad 75634a86f0 add docstring to lookupFileArg
Change-Id: Ifc149764f5a15725d3d630677c6da29def4b0f3e
2024-05-21 12:33:01 -06:00
Qyriad 6c3aea2922 add libcmd test for lookupFileArg
Change-Id: I9e2ef170ffe916f902daec8b5630d29434c5d5f2
2024-05-21 12:33:01 -06:00
Qyriad 6881476232 libfetchers: fallback to memory SQLite if fs IO fails
nix::fetchers::CacheImpl uses $XDG_CACHE_HOME, or its default based on
$HOME, to store its SQLite database. If the current process can't write
to that directory for whatever reason, though, any eval-time fetching
would fail just initializing the cache.

With this change, IO errors initializing the fetcher cache are logged
but ignored, and nix::fetchers::CacheImpl falls back to an in-memory¹
database instead.

Notably, this will fix any uses eval fetching while Lix itself is being
run in a derivation builder (such as during tests), as the derivation
builder does not set $XDG_CACHE_HOME, and sets $HOME to the non-existent
directory /homeless-shelter.

Before:

$ env -u XDG_CACHE_HOME HOME=/homeless-shelter nix -Lv eval --impure -E 'fetchTarball "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"'
error:
       … while calling the 'fetchTarball' builtin
         at «string»:1:1:
            1| fetchTarball "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"
             | ^

       error: creating directory '/homeless-shelter': Permission denied

After:

$ env -u XDG_CACHE_HOME HOME=/homeless-shelter nix -Lv eval --impure -E 'fetchTarball "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"'
warning: ignoring error initializing Lix fetcher cache: error: creating directory '/homeless-shelter': Permission denied
"/nix/store/s9lxdnn0awp37n560bg4fgr497ah4hvw-source"

¹: https://www.sqlite.org/inmemorydb.html

Change-Id: I15c38c9baaf215fc6e192b8a4c70b9692a69bc22
2024-05-21 09:30:25 -06:00

2
series

@ -1 +1 @@
Subproject commit 13bf168d0e8a20a3546a79f748404a4dec10f975
Subproject commit 36912b3b45735092627b4397c8038dabf4e096c5