andir / npins

Nix dependency pinning. Very similar to Niv but has a few features that I personally wanted.
European Union Public License 1.2
164 stars 12 forks source link

Add support for submodules and release artifacts #46

Closed piegamesde closed 2 weeks ago

piegamesde commented 12 months ago

@LunNova please give it a try, I did not manage to write tests for all of the bits

Closes #45

Also contains some refactorings and an implementation of #85

LunNova commented 11 months ago

I missed this, I'll give it a try some time this week.

LunNova commented 9 months ago

Tested it out in https://github.com/fufexan/nix-gaming/pull/86/commits/0bdbef60f855ee53091772deec3f14bba049ff2b this morning and it seems to work!

this week

It's been a very long week :sweat_smile:

fufexan commented 5 months ago

@piegamesde is there any work left to do on this PR? I am willing to contribute to get this merged sooner.

piegamesde commented 5 months ago

@fufexan Work is done IIRC, but CI fails for some reason and I cannot reproduce it on my machine. Help appreciated.

phanirithvij commented 1 month ago

Edit: ci failed with same tests, closing as duplicate

I tried it on my local setup, ran gh pr checkout 46; nix-build -A meta.tests here's the log.

tests log ``` $ git rev-parse --short HEAD 153e066 $ nix-build -A meta.tests these 6 derivations will be built: /nix/store/6w6m710kjz2ar7qfjbii9nc6zghnng8v-from-git-repo-tag.drv /nix/store/76r0n602r0gm9ix302id5jyc3cixsjb5-git-submodule.drv /nix/store/7slpk7dcp0qbjj7zjj4rzb2jd7yxa2dl-github-release.drv /nix/store/av9hc7210vniv9n2s26a08k9g6358qhg-github-branch.drv /nix/store/vin7cmjixm13v6k63qmq9f3h9iixvd4s-github-submodule.drv /nix/store/vqblzylf385dynw0ax3y12kkqy7jdq3r-git-dependency.drv building '/nix/store/6w6m710kjz2ar7qfjbii9nc6zghnng8v-from-git-repo-tag.drv'... building '/nix/store/vqblzylf385dynw0ax3y12kkqy7jdq3r-git-dependency.drv'... building '/nix/store/76r0n602r0gm9ix302id5jyc3cixsjb5-git-submodule.drv'... building '/nix/store/av9hc7210vniv9n2s26a08k9g6358qhg-github-branch.drv'... building '/nix/store/7slpk7dcp0qbjj7zjj4rzb2jd7yxa2dl-github-release.drv'... building '/nix/store/vin7cmjixm13v6k63qmq9f3h9iixvd4s-github-submodule.drv'... Running test from-git-repo-tag Running test git-dependency Running test git-submodule Running test github-branch Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... Running test github-release /build/tmp.cER2jW0kWO Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... total 8 drwxr-xr-x 2 nixbld nixbld 4096 Jun 14 15:55 . drwxr-xr-x 3 nixbld nixbld 4096 Jun 14 15:55 .. lrwxrwxrwx 1 nixbld nixbld 52 Jun 14 15:55 v0.2 -> /nix/store/fd03fa9i6bjqs6w3gcnffvhgzpfxd1fi-test.tar /build/tmp.5nWnRDFMSk total 8 drwxr-xr-x 2 nixbld nixbld 4096 Jun 14 15:55 . drwxr-xr-x 3 nixbld nixbld 4096 Jun 14 15:55 .. lrwxrwxrwx 1 nixbld nixbld 52 Jun 14 15:55 v0.2 -> /nix/store/fd03fa9i6bjqs6w3gcnffvhgzpfxd1fi-test.tar Running test github-submodule /build/tmp.xO0yvAOykH total 8 drwxr-xr-x 2 nixbld nixbld 4096 Jun 14 15:55 . drwxr-xr-x 3 nixbld nixbld 4096 Jun 14 15:55 .. lrwxrwxrwx 1 nixbld nixbld 52 Jun 14 15:55 cbbbea814edccc7bf23af61bd620647ed7c0a436 -> /nix/store/fd03fa9i6bjqs6w3gcnffvhgzpfxd1fi-test.tar Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... /build/tmp.xO0yvAOykH total 8 drwxr-xr-x 2 nixbld nixbld 4096 Jun 14 15:55 . drwxr-xr-x 3 nixbld nixbld 4096 Jun 14 15:55 .. lrwxrwxrwx 1 nixbld nixbld 52 Jun 14 15:55 cbbbea814edccc7bf23af61bd620647ed7c0a436 -> /nix/store/fd03fa9i6bjqs6w3gcnffvhgzpfxd1fi-test.tar Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... Connection to 127.0.0.1 8000 port [tcp/*] succeeded! [INFO ] Welcome to npins! [INFO ] Creating `npins` directory [INFO ] Writing default.nix [INFO ] Writing initial sources.json (empty) [INFO ] Successfully written initial files to 'npins'. [INFO ] Adding 'foo' … 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - Connection to 127.0.0.1 8000 port [tcp/*] succeeded! [INFO ] Welcome to npins! [INFO ] Creating `npins` directory [INFO ] Writing default.nix [INFO ] Writing initial sources.json (empty) [INFO ] Successfully written initial files to 'npins'. [INFO ] Adding 'foo' … 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - Connection to 127.0.0.1 8000 port [tcp/*] succeeded! [INFO ] Welcome to npins! [INFO ] Creating `npins` directory [INFO ] Writing default.nix [INFO ] Writing initial sources.json (empty) [INFO ] Successfully written initial files to 'npins'. [INFO ] Adding 'foo' … 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/ef/ab3aca4ea11feb51ec521d54f612512ed5ec83 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/b5/f4a001982a5a1f552eda8d8f1aa9b83a382dbe HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/fe/108dc5b72167a1894eb9015856d0cf3b2ec88b HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/50/1a65f802bb17d44b96282452effc48fa4d48f7 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/b0/7a82f4a6e7113e44e8c610a768f3c31b937429 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/e5/9de84ce3eb25d721dc3098593b400c1b10d1be HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/6d/e10fbdc59fa688b1daa4dd9ce16095bae598d0 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/60/fe1f267badc7a9d0cb936f49f165395f00e25a HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/49/d59571fbf6e077eece30f8c418b6aad15e20b0 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/d7/025695e2fde1248b773bf4ba8e0a8862b18176 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/5e/fb9bc29c482e023e40e0a2b3b7e49cec842034 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/ef/ab3aca4ea11feb51ec521d54f612512ed5ec83 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/b5/f4a001982a5a1f552eda8d8f1aa9b83a382dbe HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/fe/108dc5b72167a1894eb9015856d0cf3b2ec88b HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/e5/9de84ce3eb25d721dc3098593b400c1b10d1be HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/50/1a65f802bb17d44b96282452effc48fa4d48f7 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/b0/7a82f4a6e7113e44e8c610a768f3c31b937429 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/6d/e10fbdc59fa688b1daa4dd9ce16095bae598d0 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/60/fe1f267badc7a9d0cb936f49f165395f00e25a HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/49/d59571fbf6e077eece30f8c418b6aad15e20b0 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/d7/025695e2fde1248b773bf4ba8e0a8862b18176 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/5e/fb9bc29c482e023e40e0a2b3b7e49cec842034 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - Connection to 127.0.0.1 8000 port [tcp/*] succeeded! [INFO ] Welcome to npins! [INFO ] Creating `npins` directory [INFO ] Writing default.nix [INFO ] Writing initial sources.json (empty) [INFO ] Successfully written initial files to 'npins'. [INFO ] Adding 'bar' … 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - Connection to 127.0.0.1 8000 port [tcp/*] succeeded! [INFO ] Welcome to npins! [INFO ] Creating `npins` directory [INFO ] Writing default.nix [INFO ] Writing initial sources.json (empty) [INFO ] Successfully written initial files to 'npins'. [INFO ] Adding 'bar' … 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/bar.git/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/bar.git/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/fd/ddde0c448810ac9adaff10e15de2a57e9278b5 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/5e/fb9bc29c482e023e40e0a2b3b7e49cec842034 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/bar.git/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/bar.git/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/bar.git/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/bar.git/HEAD HTTP/1.1" 200 - Connection to 127.0.0.1 8000 port [tcp/*] succeeded! [INFO ] Welcome to npins! [INFO ] Creating `npins` directory [INFO ] Writing default.nix [INFO ] Writing initial sources.json (empty) [INFO ] Successfully written initial files to 'npins'. [INFO ] Adding 'foo' … 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /owner/foo.git/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /owner/foo.git/HEAD HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/bar/archive/efab3aca4ea11feb51ec521d54f612512ed5ec83.tar.gz HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /api/repos/foo/bar/tarball/v0.2 HTTP/1.1" 200 - repository: http://localhost:8000/foo/bar.git branch: test-branch submodules: false revision: efab3aca4ea11feb51ec521d54f612512ed5ec83 url: http://localhost:8000/foo/bar/archive/efab3aca4ea11feb51ec521d54f612512ed5ec83.tar.gz hash: 0pc6lycgl61zazhrpxvxmjmaai68725pp9klsn6r3wv1n5rcphd5 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /owner/foo/archive/fdddde0c448810ac9adaff10e15de2a57e9278b5.tar.gz HTTP/1.1" 200 - repository: http://localhost:8000/foo/bar.git pre_releases: false submodules: false version: v0.2 revision: efab3aca4ea11feb51ec521d54f612512ed5ec83 hash: 0zhf0a8kh8gi1w8x849ccwm3v049hdhjb579823kd0a3xfsb44lm 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/bar/archive/efab3aca4ea11feb51ec521d54f612512ed5ec83.tar.gz HTTP/1.1" 200 - repository: http://localhost:8000/foo pre_releases: false submodules: false version: v0.2 revision: efab3aca4ea11feb51ec521d54f612512ed5ec83 hash: 0zw6j17zp9hah2xbl9krjwn2qa058psc2llidiqiqdkhnw1ipwff repository: http://localhost:8000/owner/foo.git branch: main submodules: false revision: fdddde0c448810ac9adaff10e15de2a57e9278b5 url: http://localhost:8000/owner/foo/archive/fdddde0c448810ac9adaff10e15de2a57e9278b5.tar.gz hash: 0ip26j2h11n1kgkz36rl4akv694yz65hr72q4kv4b3lxcbi65b3p 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/HEAD HTTP/1.1" 200 - efab3aca4ea11feb51ec521d54f612512ed5ec83 HEAD efab3aca4ea11feb51ec521d54f612512ed5ec83 refs/heads/test-branch b5f4a001982a5a1f552eda8d8f1aa9b83a382dbe refs/tags/0.1 fe108dc5b72167a1894eb9015856d0cf3b2ec88b refs/tags/release efab3aca4ea11feb51ec521d54f612512ed5ec83 refs/tags/v0.2 "/build/437xdqmbrlh6xgghj3an5a4g2f56pir4-source" [INFO ] Adding 'foo2' … 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /api/repos/foo/bar/tarball/v0.2 HTTP/1.1" 200 - repository: http://localhost:8000/foo branch: test-branch submodules: false revision: efab3aca4ea11feb51ec521d54f612512ed5ec83 hash: 0zw6j17zp9hah2xbl9krjwn2qa058psc2llidiqiqdkhnw1ipwff 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /owner/foo.git/info/refs?service=git-upload-pack HTTP/1.1" 200 - 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /owner/foo.git/HEAD HTTP/1.1" 200 - +++ jq -r .pins.bar.version npins/sources.json foo: (git repository) repository: http://localhost:8000/foo branch: test-branch submodules: false revision: efab3aca4ea11feb51ec521d54f612512ed5ec83 hash: 0zw6j17zp9hah2xbl9krjwn2qa058psc2llidiqiqdkhnw1ipwff ++ eq null null ++ local a=null ++ local b=null ++ printf '[[ "%s" = "%s" ]]' null null [[ "null" = "null" ]]++ [[ null = \n\u\l\l ]] ++ echo ' OK' OK +++ jq -r .pins.bar.revision npins/sources.json ++ eq efab3aca4ea11feb51ec521d54f612512ed5ec83 4a9f34428ed83d50b2d398f0bfaf79ae5716c905 ++ local a=efab3aca4ea11feb51ec521d54f612512ed5ec83 ++ local b=4a9f34428ed83d50b2d398f0bfaf79ae5716c905 ++ printf '[[ "%s" = "%s" ]]' efab3aca4ea11feb51ec521d54f612512ed5ec83 4a9f34428ed83d50b2d398f0bfaf79ae5716c905 [[ "efab3aca4ea11feb51ec521d54f612512ed5ec83" = "4a9f34428ed83d50b2d398f0bfaf79ae5716c905" ]]++ [[ efab3aca4ea11feb51ec521d54f612512ed5ec83 = \4\a\9\f\3\4\4\2\8\e\d\8\3\d\5\0\b\2\d\3\9\8\f\0\b\f\a\f\7\9\a\e\5\7\1\6\c\9\0\5 ]] ++ echo ' FAIL' FAIL ++ exit 1 + exitHandler + exitCode=1 + set +e + '[' -n '' ']' + (( 1 != 0 )) + runHook failureHook + local hookName=failureHook + shift + local 'hooksSlice=failureHooks[@]' + local hook + for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"} + _eval '_callImplicitHook 0 failureHook' + declare -F '_callImplicitHook 0 failureHook' + eval '_callImplicitHook 0 failureHook' ++ _callImplicitHook 0 failureHook ++ local def=0 ++ local hookName=failureHook ++ declare -F failureHook ++ type -p failureHook ++ '[' -n '' ']' ++ return 0 + return 0 + '[' -n '' ']' + return 1 "/build/ps1qszfzp63n57m9h8vb0kzcwzq7jgjy-source" error: builder for '/nix/store/av9hc7210vniv9n2s26a08k9g6358qhg-github-branch.drv' failed with exit code 1; last 50 log lines: > repository: http://localhost:8000/foo/bar.git > branch: test-branch > submodules: false > revision: efab3aca4ea11feb51ec521d54f612512ed5ec83 > url: http://localhost:8000/foo/bar/archive/efab3aca4ea11feb51ec521d54f612512ed5ec83.tar.gz > hash: 0pc6lycgl61zazhrpxvxmjmaai68725pp9klsn6r3wv1n5rcphd5 > > 127.0.0.1 - - [14/Jun/2024 15:55:24] "GET /foo/bar/archive/efab3aca4ea11feb51ec521d54f612512ed5ec83.tar.gz HTTP/1.1" 200 - > "/build/437xdqmbrlh6xgghj3an5a4g2f56pir4-source" > +++ jq -r .pins.bar.version npins/sources.json > ++ eq null null > ++ local a=null > ++ local b=null > ++ printf '[[ "%s" = "%s" ]]' null null > [[ "null" = "null" ]]++ [[ null = \n\u\l\l ]] > ++ echo ' OK' > OK > +++ jq -r .pins.bar.revision npins/sources.json > ++ eq efab3aca4ea11feb51ec521d54f612512ed5ec83 4a9f34428ed83d50b2d398f0bfaf79ae5716c905 > ++ local a=efab3aca4ea11feb51ec521d54f612512ed5ec83 > ++ local b=4a9f34428ed83d50b2d398f0bfaf79ae5716c905 > ++ printf '[[ "%s" = "%s" ]]' efab3aca4ea11feb51ec521d54f612512ed5ec83 4a9f34428ed83d50b2d398f0bfaf79ae5716c905 > [[ "efab3aca4ea11feb51ec521d54f612512ed5ec83" = "4a9f34428ed83d50b2d398f0bfaf79ae5716c905" ]]++ [[ efab3aca4ea11feb51ec521d54f612512ed5ec83 = \4\a\9\f\3\4\4\2\8\e\d\8\3\d\5\0\b\2\d\3\9\8\f\0\b\f\a\f\7\9\a\e\5\7\1\6\c\9\0\5 ]] > ++ echo ' FAIL' > FAIL > ++ exit 1 > + exitHandler > + exitCode=1 > + set +e > + '[' -n '' ']' > + (( 1 != 0 )) > + runHook failureHook > + local hookName=failureHook > + shift > + local 'hooksSlice=failureHooks[@]' > + local hook > + for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"} > + _eval '_callImplicitHook 0 failureHook' > + declare -F '_callImplicitHook 0 failureHook' > + eval '_callImplicitHook 0 failureHook' > ++ _callImplicitHook 0 failureHook > ++ local def=0 > ++ local hookName=failureHook > ++ declare -F failureHook > ++ type -p failureHook > ++ '[' -n '' ']' > ++ return 0 > + return 0 > + '[' -n '' ']' > + return 1 For full logs, run 'nix log /nix/store/av9hc7210vniv9n2s26a08k9g6358qhg-github-branch.drv'. error (ignored): error: cannot unlink '/tmp/nix-build-github-submodule.drv-0/git-checkout-tmp-sKwkdUeR/foo-fdddde0/.git': Directory not empty error: build of '/nix/store/6w6m710kjz2ar7qfjbii9nc6zghnng8v-from-git-repo-tag.drv', '/nix/store/76r0n602r0gm9ix302id5jyc3cixsjb5-git-submodule.drv', '/nix/store/7slpk7dcp0qbjj7zjj4rzb2jd7yxa2dl-github-release.drv', '/nix/store/av9hc7210vniv9n2s26a08k9g6358qhg-github-branch.drv', '/nix/store/vin7cmjixm13v6k63qmq9f3h9iixvd4s-github-submodule.drv', '/nix/store/vqblzylf385dynw0ax3y12kkqy7jdq3r-git-dependency.drv' failed ```
My setup ``` File: /etc/nix/nix.conf # WARNING: this file is generated from the nix.* options in # your NixOS configuration, typically # /etc/nixos/configuration.nix. Do not edit it! allowed-uris = github: gitlab: git+ssh:// https://github.com/ allowed-users = root rithvij tempwl hydra auto-optimise-store = true builders = cores = 0 experimental-features = nix-command flakes http-connections = 50 log-lines = 50 max-jobs = auto require-sigs = true sandbox = relaxed sandbox-fallback = false substituters = https://cosmic.cachix.org/ https://nix-community.cachix.org https://cache.nixos.org/ system-features = nixos-test benchmark big-parallel kvm trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= trusted-substituters = trusted-users = root @wheel extra-platforms = aarch64-linux i686-linux extra-sandbox-paths = /run/binfmt /nix/store/rnqcws4kqgv8q9mw5bki3927gfdxci46-qemu-aarch64-binfmt-P-x86_64-unknown-linux-musl ``` ``` nix-shell -p nix-info --run 'nix-info -m' - system: `"x86_64-linux"` - host os: `Linux 6.6.32, NixOS, 24.11 (Vicuña), 24.11.20240603.80db252` - multi-user?: `yes` - sandbox: `relaxed` - version: `nix-env (Nix) 2.18.2` - channels(root): `"nixos"` - nixpkgs: `/nix/store/q1sq3v2brhyf6idf2hi33drn5xi9sybg-source` ```
piegamesde commented 1 month ago

After a year of struggling with flaky CI and thanks to Andi's help, this is now finally ready!