8 Oct 2024 |
Charles | somewhat related follow-up question: what's the idiomatic way to get the build closure of a thing | 22:22:28 |
Lily Foster | In reply to @charles:computer.surgery somewhat related follow-up question: what's the idiomatic way to get the build closure of a thing nix path-info -r --derivation | 22:22:40 |
Lily Foster | In reply to @charles:computer.surgery somewhat related follow-up question: what's the idiomatic way to get the build closure of a thing * nix path-info -r --derivation [...].drv can do it | 22:22:53 |
Lily Foster | In reply to @lily:lily.flowers
nix path-info -r --derivation [...].drv can do it (i think. apologies if i say batshit/incorrect stuff. i'm kinda headachy and also not on a lixed machine atm) | 22:23:38 |
Charles | no problem lol | 22:23:50 |
Charles | i've gotten this to work before but it felt super hacky so i thought i'd ask to see if there was a better way | 22:24:06 |
Charles | okay so maybe what i want is like nix path-info --recursive --derivation "$(nix path-info --derivation .#foo)" | 22:25:20 |
Charles | In reply to @charles:computer.surgery i've gotten this to work before but it felt super hacky so i thought i'd ask to see if there was a better way (https://gitlab.computer.surgery/matrix/grapevine/-/blob/5a490a4397f0c6a36dab1cb631dadc67a849deab/bin/nix-build-and-cache#L26-33) | 22:28:02 |
Charles | In reply to @charles:computer.surgery okay so maybe what i want is like nix path-info --recursive --derivation "$(nix path-info --derivation .#foo)" hmm that misses some things that my script gets; notably this only outputs .drv paths | 22:28:43 |
benjamin | the nix path-info --recursive --derivation thing outputs the .drv store path for xshmfence , but not the output paths | 22:28:47 |
benjamin | I think I may have a misunderstanding of what the build closure is as well | 22:29:04 |
benjamin | I ended up just uhh... nix copy $buildInputs --to ... | 22:29:41 |
Lily Foster | In reply to @charles:computer.surgery okay so maybe what i want is like nix path-info --recursive --derivation "$(nix path-info --derivation .#foo)" i think you can technically --derivation on output paths too, it just looks up deriver and operates on that when given a store path | 22:29:54 |
Lily Foster | In reply to @lily:lily.flowers i think you can technically --derivation on output paths too, it just looks up deriver and operates on that when given a store path (this is also something i know less well, and i normally would look up before claiming if i wasn't hurting right now, so uh again probably double check the things i'm saying) | 22:35:03 |
Charles | i hope the hurting goes away soon | 22:35:40 |
Lily Foster | yeah, me too (allegedly it should be by end of week) | 22:36:34 |
@jade_:matrix.org | In reply to @benjamin:computer.surgery the nix path-info --recursive --derivation thing outputs the .drv store path for xshmfence , but not the output paths oh, try ^* at the end of the installable? | 22:36:49 |
@jade_:matrix.org | In reply to @lily:lily.flowers i think you can technically --derivation on output paths too, it just looks up deriver and operates on that when given a store path this matches my recollection | 22:38:08 |
@jade_:matrix.org | In reply to @benjamin:computer.surgery I think I may have a misunderstanding of what the build closure is as well hm. so the build closure is the runtime closure of the direct dependencies | 22:38:47 |
@jade_:matrix.org | this is probably why you are getting big time confused | 22:38:57 |
@jade_:matrix.org | In reply to @benjamin:computer.surgery I think I may have a misunderstanding of what the build closure is as well * hm. so the build closure is the runtime closure of the direct dependencies' outputs | 22:39:02 |
@jade_:matrix.org | but what is a "build closure" for a nixos machine, meaningfully? i dont know! | 22:39:27 |
@jade_:matrix.org | like, the build closure could be everything required to build everything on the system entirely from source | 22:39:59 |
@jade_:matrix.org | but you are assuming some things will always be in binary cache and will never be built from source | 22:40:09 |
Charles | In reply to @jade_:matrix.org like, the build closure could be everything required to build everything on the system entirely from source that's what i would expect | 22:40:28 |
Lily Foster | In reply to @jade_:matrix.org but what is a "build closure" for a nixos machine, meaningfully? i dont know! i guess this would be the semantic intent for that: https://github.com/NixOS/nixpkgs/blob/e8597a0de13d645c5909f0c09dfabdbf63a88a30/nixos/modules/system/activation/top-level.nix#L88 | 22:40:57 |
@jade_:matrix.org | so is the build closure "everything required to realise all the derivations in this that dont exist in a binary cache"? there is a command for that somewhere in the legacy cli, hopefully not only exposed via nix-env but presence in binary cache is exposed via nix-env | 22:40:58 |
@jade_:matrix.org | In reply to @lily:lily.flowers i guess this would be the semantic intent for that: https://github.com/NixOS/nixpkgs/blob/e8597a0de13d645c5909f0c09dfabdbf63a88a30/nixos/modules/system/activation/top-level.nix#L88 fuck, this is the cursed thing | 22:41:17 |
@jade_:matrix.org | iirc | 22:41:22 |
Lily Foster | In reply to @jade_:matrix.org fuck, this is the cursed thing me too | 22:41:30 |