!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

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

Load older messages


SenderMessageTime
11 Mar 2025
@sinan:sinanmohd.comsinan changed their profile picture.18:25:29
@sinan:sinanmohd.comsinan changed their profile picture.18:46:53
12 Mar 2025
@fzakaria:one.ems.hostfzakaria If i use a separate store; how can i make it easily so my nix commands use it without doing --store 01:57:34
@puffnfresh:chat.home.brianmckenna.orgpuffnfresh
In reply to @fzakaria:one.ems.host
If i use a separate store; how can i make it easily so my nix commands use it without doing --store
can be set at compile time, or in nix.conf
02:15:21
@fzakaria:one.ems.hostfzakariai was thining like a bind mount or somethig with nix-shell02:15:40
@fzakaria:one.ems.hostfzakariaso it's temporary02:15:43
@fzakaria:one.ems.hostfzakariabind mounts doesn't work actually because i lose out on all my current tools in the current process02:24:13
@fzakaria:one.ems.hostfzakariain NixOS02:24:15
@fzakaria:one.ems.hostfzakaria

Okay this works though

nix run nixpkgs#fish --store /tmp/dyn-drvs

02:25:22
@fzakaria:one.ems.hostfzakaria (not sure why unshare -> mount --bind doesn't though ) 02:25:31
@puffnfresh:chat.home.brianmckenna.orgpuffnfreshdidn't you say that you wanted to do it without using --store?03:44:11
@fzakaria:one.ems.hostfzakariai meant subsequent commands04:09:50
@fzakaria:one.ems.hostfzakariadon't need the --store after that 04:09:56
@Ericson2314:matrix.orgJohn Ericson @roberthensing:matrix.org: FYI I noticed Linus Heckmann did some interesting recent commits to lix for GC fixes 22:56:05
13 Mar 2025
@Las:matrix.orgLas
In reply to @fzakaria:one.ems.host
If i use a separate store; how can i make it easily so my nix commands use it without doing --store
NIX_CONFIG
01:01:34
@0rzklv:matrix.org@0rzklv:matrix.org joined the room.07:46:39
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Fixing very significant debugger performance regression introduced in 2.21: https://github.com/NixOS/nix/pull/1264513:42:40
@roberthensing:matrix.orgroberth What do we think of suffixing fields with _ to make them visually distinct from locals/params? I'm open to it (implicit this-> may have been a mistake, hurting understanding and refactoring) but esp John Ericson tomberek Eelco Mic92 will also have to look at such code 14:59:57
@joerg:thalheim.ioMic92 Robert Hensing (roberth): my lsp does it locally for my editor, but we don't have in github, so might be worth it. There is clang-tidy also can do this automatically: https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html#cmdoption-arg-ClassMemberPrefix 15:05:03
@joerg:thalheim.ioMic92 * Robert Hensing (roberth): my lsp does it locally for my editor with colors, but we don't have in github, so might be worth it. There is clang-tidy also can do this automatically: https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html#cmdoption-arg-ClassMemberPrefix 15:06:44
@roberthensing:matrix.orgroberthAlso suffix, nice! @Mic92 on GitHub we don't have that highlighting, for doing reviews15:19:39
@niksnut:matrix.orgniksnutI wouldn't love it, seems a bit ugly. Yeah seems better if the lsp can figure it out.15:30:18
@Ericson2314:matrix.orgJohn Ericson
In reply to @roberthensing:matrix.org
What do we think of suffixing fields with _ to make them visually distinct from locals/params? I'm open to it (implicit this-> may have been a mistake, hurting understanding and refactoring) but esp John Ericson tomberek Eelco Mic92 will also have to look at such code
We do use a _ suffix for other things right now FYI
15:40:41
@niksnut:matrix.orgniksnut yeah, mostly for Sync state values 16:00:58
@mschwaig:matrix.orgMartin Schwaighofer

I'm trying to re-implement the way content-addressed derivations do dependency resolution from unresolved to resolved (aka basic) derivation, but outside of Nix - because I'm trying to do stricter validation with different signatures. I've gotten fairly far with that, but I'm seeing some "placeholder paths" like "/163l1qfs4mlpsl1g8m4ra6n08n8cscdgs9xgcbpijp61c1fjhcal" or "/0k24dfvijqra5pjhd1xhkg467fvh33cllgsxvpyklyhzymrm13xb/bin/bash" in the output of nix derivation show in places like the builder field of unresolved derivations. I don't know how I can resolve those myself, because I don't know how to find out either the unresolved derivation output it is associated with, or the store path nix wants it resolved to. In contrast, I can already resolve the outputs listed in inputDrvs to store paths myself just fine with the same results as Nix.

So I'm wondering, how do those placeholder paths work?

I saw that builtins.placeholder exists, but I don't really get how that relates to my problem from just reading the docs. 😅

(I also see one such path in resolved derivations, but there it's always the same "/1rz4g4znpzjwh1xymhjpm42vipw92pr73vdgl6xs1hycac8kf2n9" path in the "out" environment variable, so I think that's a different issue.)

16:06:18
@puck:puck.moepuck
In reply to @mschwaig:matrix.org

I'm trying to re-implement the way content-addressed derivations do dependency resolution from unresolved to resolved (aka basic) derivation, but outside of Nix - because I'm trying to do stricter validation with different signatures. I've gotten fairly far with that, but I'm seeing some "placeholder paths" like "/163l1qfs4mlpsl1g8m4ra6n08n8cscdgs9xgcbpijp61c1fjhcal" or "/0k24dfvijqra5pjhd1xhkg467fvh33cllgsxvpyklyhzymrm13xb/bin/bash" in the output of nix derivation show in places like the builder field of unresolved derivations. I don't know how I can resolve those myself, because I don't know how to find out either the unresolved derivation output it is associated with, or the store path nix wants it resolved to. In contrast, I can already resolve the outputs listed in inputDrvs to store paths myself just fine with the same results as Nix.

So I'm wondering, how do those placeholder paths work?

I saw that builtins.placeholder exists, but I don't really get how that relates to my problem from just reading the docs. 😅

(I also see one such path in resolved derivations, but there it's always the same "/1rz4g4znpzjwh1xymhjpm42vipw92pr73vdgl6xs1hycac8kf2n9" path in the "out" environment variable, so I think that's a different issue.)

they are values derived from either the current drv's output, or any input drv + its output. its representation is / then the nixbase32 repr of the full sha256 of either "nix-output: " or "nix-upstream-output: :<the name the output would have; so either drv's name or append a dash and the output name>"
16:39:23
@puck:puck.moepuckyou'll have to pessimistically calculate every possible placeholder and its replacement value, then just search+replace the environment and builder args for said placeholders16:40:00
@puck:puck.moepuck(note though, you may want to check the signature that gets signed for realisations if you haven't already; it might serve your needs if you just want a drv + its realised input paths signed)16:41:04
@puck:puck.moepuck
In reply to @puck:puck.moe
they are values derived from either the current drv's output, or any input drv + its output. its representation is / then the nixbase32 repr of the full sha256 of either "nix-output: " or "nix-upstream-output: :<the name the output would have; so either drv's name or append a dash and the output name>"
uh, one colon. element's not letting me edit this message :v
16:42:22
@jade_:matrix.orgjade_ NIX_REMOTE 20:41:29

Show newer messages


Back to Room ListRoom Version: 6