!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

943 Members
For people hacking on the Nix package manager itself200 Servers

Load older messages


SenderMessageTime
20 Apr 2025
@tomberek:matrix.orgtomberekI have explored a concept before where a flake could be composed of multiple sub-components that had inter-related inputs. It is different from what are normally called sub-flakes, but I think is closer to what people are expecting them to be. I called it "crystals" and the initial proof-of-concept was a relatively simple matter of searching through a source tree for all crystal.nix files and merging their inputs into the root's lockfile: https://github.com/flox/nix/commit/8a684bdee6009e6375e855ed79bb9c532dae805c . 16:50:24
@tomberek:matrix.orgtomberekInputs would "bubble-up" into the root lockfile to store a canonical lock, and also "bubble-down" as inputs available for each sub-crystal to use.16:51:59
21 Apr 2025
@Las:matrix.orgLasthere really needs to be better docs on how to calculate placeholder paths12:50:36
@flokli:matrix.orgflokli
In reply to @Las:matrix.org
there really needs to be better docs on how to calculate placeholder paths
https://snix.dev/rustdoc/src/nix_compat/store_path/utils.rs.html#205-209
17:38:22
@Las:matrix.orgLasis this for CA too?17:38:51
@flokli:matrix.orgflokliNo idea17:40:31
@mschwaig:matrix.orgMartin Schwaighofer
In reply to @Las:matrix.org
is this for CA too?
This helped me implementing the CA ones:
https://github.com/puckipedia/tarnix/blob/canon/ca-placeholder.nix
17:45:14
@Las:matrix.orgLasthis is cursed17:46:42
@puck:puck.moepuck^_^19:14:37
@puck:puck.moepuckmost of the logic in that file is to properly adjust stringLength output to the post-substitution paths, even, the actual logic there is like three lines19:18:01
22 Apr 2025
@jaen:matrix.orgjaen
In reply to @tomberek:matrix.org
I have explored a concept before where a flake could be composed of multiple sub-components that had inter-related inputs. It is different from what are normally called sub-flakes, but I think is closer to what people are expecting them to be. I called it "crystals" and the initial proof-of-concept was a relatively simple matter of searching through a source tree for all crystal.nix files and merging their inputs into the root's lockfile: https://github.com/flox/nix/commit/8a684bdee6009e6375e855ed79bb9c532dae805c .
Interesting, but I think this loses the useful property of scoping inputs to some subflake, such as development inputs. For this to be equivalent, I think it would have to have some concept of development (name to be biskeshed) inputs that are only fetched if actually used (e.g. a devshell using them is entered or something). Not sure how much more complex this would have made the implementation.
07:01:37
@flokli:matrix.orgflokliThis is the dependencies / devDependencies problem, and whether to transitively propagate dev dependencies inputs10:06:56
@flokli:matrix.orgflokliI'm not sure there's been some scoping out around this yet, but it's one of the issues with the current design.10:13:23
@sternenseemann:systemli.orgsterni (he/him)Any ideas what change this could be related to? Is this a bug or where there conscious changes to restrict-eval? I looked at the changelogs but nothing jumped out to me (maybe the relative flake change?) https://github.com/NixOS/nixpkgs/issues/40078410:15:13
@dramforever:matrix.orgdramforever can you try nix-shell -i bash -p coreutils jq nix -I nixpkgs=.? 10:59:59
@dramforever:matrix.orgdramforever * can you try nix-shell -p coreutils jq nix -I nixpkgs=.? 11:00:16
@dramforever:matrix.orgdramforeversorry, edited11:00:21
@sternenseemann:systemli.orgsterni (he/him)sure, that works fine11:01:17
@dramforever:matrix.orgdramforever and then also bash {that script} 11:01:22
@dramforever:matrix.orgdramforeverbut with the dependencies in $PATH11:01:35
@dramforever:matrix.orgdramforever in like nix shell or something 11:02:27
@dramforever:matrix.orgdramforeverwell, it's supposed to fail pretty fast right? if so i can't reproduce this problem11:04:14
@dramforever:matrix.orgdramforever i'm on aca270648eca which is latest master of writing 11:06:18
@sternenseemann:systemli.orgsterni (he/him) hmm I can with nix-instantiate --eval --option restrict-eval true -I . ./maintainers/scripts/haskell/transitive-broken-packages.nix on current master 11:08:40
@sternenseemann:systemli.orgsterni (he/him)it's possible that it's because of a daemon / frontend version mismatch then11:09:10
@dramforever:matrix.orgdramforever it hasn't finished but it's doing something for me and hasn't failed yet 11:09:26
@sternenseemann:systemli.orgsterni (he/him)then it works :)11:09:35
@sternenseemann:systemli.orgsterni (he/him)I'll ask the other Haskell ppl if no one else can repro it, it doesn't matter probably the daemon11:10:03
@dramforever:matrix.orgdramforevermaybe there's some funny impurities?11:11:06
@dramforever:matrix.orgdramforever what's your nixpkgs commit, and what does which nix say? 11:16:31

Show newer messages


Back to Room ListRoom Version: 6