!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

857 Members
For people hacking on the Nix package manager itself188 Servers

Load older messages


SenderMessageTime
11 Jul 2025
@dramforever:matrix.orgdramforeverthe existing tests handle building in a local store part16:05:05
@dramforever:matrix.orgdramforeveroh16:05:07
@dramforever:matrix.orgdramforeverby local i mean separate16:05:11
@dramforever:matrix.orgdramforeverit doesn't touch the system nix16:05:15
@m4dc4pxx:matrix.org@m4dc4pxx:matrix.orgEasiest (for me) would be running the nix binary I built w/ extra logging against real AWS 16:05:21
@dramforever:matrix.orgdramforeverso it would sidestep the problem of having to change your system nix16:06:01
@dramforever:matrix.orgdramforeverit can even test a separate store with daemon and client16:06:16
@m4dc4pxx:matrix.org@m4dc4pxx:matrix.orgAny particular script you could suggest? There are a lot in that directory.16:07:00
@dramforever:matrix.orgdramforever start at common.sh and look at the few it sources 16:09:45
@dramforever:matrix.orgdramforever * start at common.sh and look at the few scripts it sources 16:09:49
@dramforever:matrix.orgdramforeveror just add your own test script16:09:53
@dramforever:matrix.orgdramforever most important is probably common/vars.sh, which sets a bunch of NIX_*_DIR environment variables 16:13:43
@dramforever:matrix.orgdramforeverso it redirects everything away from the system store and configs and stuff16:13:57
@m4dc4pxx:matrix.org@m4dc4pxx:matrix.org In common/functions I found startDaemon; from that it seems setting NIX_DAEMON_SOCKET_PATH to something in my local dir, then running nix daemon (in same shell), gets me further. Thanks for pointer! 16:23:12
@dramforever:matrix.orgdramforeverah yes, that would help if you need a daemon16:25:00
@dramforever:matrix.orgdramforeveryou got it16:25:06
@m4dc4pxx:matrix.org@m4dc4pxx:matrix.org Unfortunately, running nix-instantiate seems to lead some sort of fork bomb where thousands of nix processes spawn. 🤔 16:27:26
@dramforever:matrix.orgdramforevermaybe you don't need a daemon?16:29:17
@m4dc4pxx:matrix.org@m4dc4pxx:matrix.org

See previous posting :)

Hello! I'm trying to do some nix hacking on macos. I've built nix successfully, but my changes aren't showing up when I run the binary. (I've added logging I'm pretty sure I should see, and its not there.) I suspect its because my system nix uses the multi-user setup and the daemon is not running the binary I built. Is there any solution besides replacing the system nix? Or am I looking in the wrong direction? Appreciate any help!

16:30:35
@dramforever:matrix.orgdramforeveri'm not sure if you need a daemon...16:31:18
@m4dc4pxx:matrix.org@m4dc4pxx:matrix.org I don't want a daemon but I don't know if I have a choice. Previously, running nix-instantiate seemed to defer to the system daemon and did not produce the output I expected. 16:31:23
@dramforever:matrix.orgdramforever i just tried NIX_STORE_DIR=$(pwd)/meow/store NIX_STATE_DIR=$(pwd)/meow/var nix-instantiate --option store local . -A hello 16:32:30
@dramforever:matrix.orgdramforeverthis works, but i'm also on linux16:32:37
@dramforever:matrix.orgdramforeverhopefully it should work on macos16:33:07
@m4dc4pxx:matrix.org@m4dc4pxx:matrix.orgDo you have multi-user nix installed?16:33:29
@m4dc4pxx:matrix.org@m4dc4pxx:matrix.org* Do you have multi-user nix installed/configured?16:33:42
@dramforever:matrix.orgdramforeveryes16:34:17
@dramforever:matrix.orgdramforever --option store local should override that 16:34:28
@dramforever:matrix.orgdramforever although i think NIX_STORE_DIR also does? but that can't hurt 16:36:33
@dramforever:matrix.orgdramforeveryes i can confirm this works without contacting the daemon16:36:53

Show newer messages


Back to Room ListRoom Version: 6