!9IQChSjwSHXPPWTa:lix.systems

Lix

1140 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms315 Servers

Load older messages


SenderMessageTime
13 Apr 2026
@raitobezarius:matrix.orgraitobezariusthere is19:33:19
@raitobezarius:matrix.orgraitobezariuswe made auto-allocate-uid dependent on cgroups19:33:32
@raitobezarius:matrix.orgraitobezariusbecause killing things under a uid is annoying under linux without cgroups19:33:44
@whispers:catgirl.cloudwhispers [& it/fae]ah, makes sense. thanks!19:35:14
@charles:computer.surgeryCharles TIL { __toString = self: ...; } 20:38:32
@blokyk:matrix.orgzoë (she/her) wait til you hear about { outPath = "foo"; } + "/bin/hello" and { __functor = self: ...; } :D 20:39:54
@blokyk:matrix.orgzoë (she/her) * wait til you hear about { outPath = "foo"; } + "/bin/hello" and functors ({ __functor = self: ...; }) :D 20:40:15
@charles:computer.surgeryCharlesi knew about functor already actually20:40:20
@charles:computer.surgeryCharles that + is scuffed though lol 20:40:31
@charles:computer.surgeryCharlesit makes sense but still20:40:52
@blokyk:matrix.orgzoë (she/her) yep, especially because that value is not a path according to the builtins (isPath {...} = false, isAttrs {...} = true), which makes it really transparent in some cases while still breaking down when it's least convenient (e.g. trying to use a derivation (which, for most cases, is any set with outPath) as a nixpkgs module) 20:43:43
@blokyk:matrix.orgzoë (she/her) * yep, especially because that value is not a path according to the builtins (isPath {...} = false, isAttrs {...} = true), which makes it really transparent in some cases while still breaking down when it's least convenient (e.g. trying to use a derivation (which, for most cases, is any set with outPath) as a nixpkgs module, because the module system uses builtins.isPath but never foo?outPath) 20:45:16
@blokyk:matrix.orgzoë (she/her)

so, for example, trying to directly put a pin from npins into a module's import list doesn't work; instead, you need to explicitely use .outPath on it:

{ ... }:
let pins = import ./npins {}; in {
  imports = [
    pins.press # doesn't work
    pins.nix-z4h.outPath # works
  ];
}
20:47:13
@charles:computer.surgeryCharlesoh, that's silly20:47:57
@charles:computer.surgeryCharlesi assume there's a good reason why this hasn't been changed?20:48:05
@blokyk:matrix.orgzoë (she/her) *

so, for example, trying to directly put a pin from npins into a module's import list doesn't work; instead, you need to explicitely use .outPath on it:

{ ... }:
let pins = import ./npins {}; in {
  imports = [
    pins.press # doesn't work
    pins.nix-z4h.outPath # works
  ];
}
20:48:32
@charles:computer.surgeryCharles
nix-repl> builtins.getContext (builtins.toString <nixpkgs>)
{ }

nix-repl> builtins.getContext "${<nixpkgs>}"
{
  "/nix/store/bwdc9wx2vwdawf6pfv6kcdjc4lz87nhb-anvdcc2arw7kqrvwnidvhw6ypkkvws68-source" = { ... };
}

nix-repl> <nixpkgs>
/nix/store/anvdcc2arw7kqrvwnidvhw6ypkkvws68-source

tangentially related, this was interesting. also that second expr took a very long time to run

20:48:38
@blokyk:matrix.orgzoë (she/her) worst part is that if you wrote ${pins.press} instead, it would have worked just fine ;-; 20:49:08
@blokyk:matrix.orgzoë (she/her) * worst part is that if you wrote ${pins.press} instead, it would work just fine ;-; 20:49:14
@blokyk:matrix.orgzoë (she/her)i have no idea; i assume there is, but i've never seen a nixpkgs issue for it and i've been too lazy to make one and fight against whatever inevitable nitpicking/bikeshedding would occur (especially since i knew zilch about the module system)20:50:33
@charles:computer.surgeryCharleslol reasonable20:50:52
@blokyk:matrix.orgzoë (she/her) yeah, toString and interpolation resulting in differently-contexted strings is another biiiig footgun 🙃 20:51:19
@blokyk:matrix.orgzoë (she/her)it has bit me many times before :/20:51:32
@blokyk:matrix.orgzoë (she/her)but it's also kinda load bearing20:51:45
@blokyk:matrix.orgzoë (she/her) the most frustrating part is mostly when using other's code (including nixpkgs), since then you have to go digging into every function to know whether or not the drv/path you're passing gets interpolated or toString'd 20:52:37
@blokyk:matrix.orgzoë (she/her) * the most frustrating part is mostly when using other's code (including nixpkgs), since then you have to go digging into every function to know whether or not the drv/path you're passing gets interpolated or toString'd, and there's some contexts/applications where that really matters 20:53:18
@charles:computer.surgeryCharlesoof20:53:27
@blokyk:matrix.orgzoë (she/her) (also yeah i've also noticed getContext taking a bit of time in the past, though i had always assumed that was either just an illusion or a personal thing; it might just be because it's computing/instantiating the derivation?) 20:55:55
@charles:computer.surgeryCharlesi think that's why, yeah20:56:09
@charles:computer.surgeryCharlesbecause the store path it outputs is weird i assume it's making another copy of nixpkgs, at minimum, which isn't the fastest thing to do20:56:42

There are no newer messages yet.


Back to Room ListRoom Version: 10