Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix: fix nix run by setting mainProgram to waku #484

Merged
merged 1 commit into from
Mar 6, 2023
Merged

Conversation

jakubgs
Copy link
Contributor

@jakubgs jakubgs commented Mar 6, 2023

Otherwise it fails with:

 > nix run github:status-im/go-waku
error: unable to execute '/nix/store/xsmhw1yqz5w9bdgfsprxmhcycl7011wz-go-waku/bin/go-waku': No such file or directory

 > ls -l /nix/store/xsmhw1yqz5w9bdgfsprxmhcycl7011wz-go-waku/bin
total 37914
-r-xr-xr-x 1 root root 38775544 Jan  1  1970 waku

The other option is to change the output binary path from waku to go-waku, but that would have to be done by either renaming cmd/waku to cmd/go-waku or some awkward patching of buildGo119Module.

Otherwise it fails with:
```
 > nix run github:status-im/go-waku
error: unable to execute '/nix/store/xsmhw1yqz5w9bdgfsprxmhcycl7011wz-go-waku/bin/go-waku': No such file or directory

 > ls -l /nix/store/xsmhw1yqz5w9bdgfsprxmhcycl7011wz-go-waku/bin
total 37914
-r-xr-xr-x 1 root root 38775544 Jan  1  1970 waku
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
@jakubgs jakubgs added the nix label Mar 6, 2023
@jakubgs jakubgs requested a review from richard-ramos March 6, 2023 13:43
@jakubgs jakubgs self-assigned this Mar 6, 2023
@status-im-auto
Copy link

status-im-auto commented Mar 6, 2023

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 38de493 #1 2023-03-06 13:44:57 ~1 min linux 📦deb
✔️ 38de493 #1 2023-03-06 13:45:44 ~1 min nix-flake 📄log
✔️ 38de493 #1 2023-03-06 13:47:25 ~3 min android 📦tgz
✔️ 38de493 #1 2023-03-06 13:47:37 ~3 min ios 📦tgz

@jakubgs
Copy link
Contributor Author

jakubgs commented Mar 6, 2023

Appears to be working:

 > nix run 'github:status-im/go-waku?ref=nix/fix-nix-run' 
2023-03-06T14:49:21.121+0100	INFO	gowaku	waku/node.go:238	Version details 	{"node": "16Uiu2HAmNKjWkyB5DA1gRwrDEjNAkTt2tsQBg7tmMghZfnbgdZMy", "version": "0.5.1", "commit": "38de493"}
2023-03-06T14:49:21.121+0100	INFO	gowaku.node2.timesource	timesource/ntp.go:169	starting service	{"node": "16Uiu2HAmNKjWkyB5DA1gRwrDEjNAkTt2tsQBg7tmMghZfnbgdZMy"}
2023-03-06T14:49:21.121+0100	INFO	gowaku.node2	node/keepalive.go:34	setting up ping protocol	{"node": "16Uiu2HAmNKjWkyB5DA1gRwrDEjNAkTt2tsQBg7tmMghZfnbgdZMy", "duration": 300}
2023-03-06T14:49:21.121+0100	INFO	gowaku.node2	node/wakunode2.go:264	listening	{"node": "16Uiu2HAmNKjWkyB5DA1gRwrDEjNAkTt2tsQBg7tmMghZfnbgdZMy", "multiaddr": ["/ip4/192.168.1.101/tcp/60000/p2p/16Uiu2HAmNKjWkyB5DA1gRwrDEjNAkTt2tsQBg7tmMghZfnbgdZMy", "/ip4/127.0.0.1/tcp/60000/p2p/16Uiu2HAmNKjWkyB5DA1gRwrDEjNAkTt2tsQBg7tmMghZfnbgdZMy"]}

@jakubgs jakubgs merged commit 38de493 into master Mar 6, 2023
@jakubgs jakubgs deleted the nix/fix-nix-run branch March 6, 2023 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants