!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

891 Members
179 Servers

Load older messages


SenderMessageTime
21 Jun 2023
@antifuchs:asf.computer@antifuchs:asf.computerit's in the original repo17:51:18
@adam:valkor.net@adam:valkor.netwhat if you use the actual branch name?17:52:03
@antifuchs:asf.computer@antifuchs:asf.computerbut good call - maybe there's a way to find the branch of the PR? I'm trying to determine that in a hydra jobset derivation, and my understanding of how to go from one bit of information to the other is ... lacking17:52:18
@antifuchs:asf.computer@antifuchs:asf.computer(as are the docs, tbqh)17:52:22
@antifuchs:asf.computer@antifuchs:asf.computerahhh, I think I see how to get at the branch name. this might work!17:54:57
@antifuchs:asf.computer@antifuchs:asf.computer perfect, hydra gets the entire pull request API response, so I can easily use info.head.ref as the branch ref. thanks for the help (: 17:58:20
@adam:valkor.net@adam:valkor.netyou're welcome. :) 18:26:27
@alx_sim:matrix.org@alx_sim:matrix.org joined the room.19:43:08
23 Jun 2023
@peacememories:matrix.orgpeacememories (Old) left the room.07:30:47
@peacememories:matrix.orgpeacememories (Old) joined the room.07:31:03
@emilazy:matrix.orgemily is there any way to get information on the input declaration of a flake input from the input values passed to outputs? 11:27:36
@emilazy:matrix.orgemily e.g. the type (github etc.) and repo 11:27:44
@emilazy:matrix.orgemilyit seems like there might not be?11:27:53
@a-kenji:matrix.orgkenjiDoesn't nix flake metadata show that?11:29:51
@emilazy:matrix.orgemilyI want to access it from inside Nix code11:30:14
@a-kenji:matrix.orgkenjiAh!11:30:57
@crtified:crtified.meCRTified
In reply to @emilazy:matrix.org
it seems like there might not be?
Only thing I can find ad hoc is the sourceInfo and _type attributes
11:34:14
@crtified:crtified.meCRTifiedbut they're different for e.g. non-flake inputs11:34:39
@crtified:crtified.meCRTified (non-flake has neither of them, but rev and shortRev instead) 11:35:14
@emilazy:matrix.orgemily yeah, unfortunately it seems like sourceInfo doesn't really include... source info 11:37:31
@emilazy:matrix.orgemilyI was hoping it'd be possible to intelligently link to sources of module option definitions in manuals11:38:01
@crtified:crtified.meCRTifiedI originally wanted to make the argument that remotes could be considered impure, but then I noticed that the URL is given in the flake, so at that point not impure at all11:38:14
@emilazy:matrix.orgemilyby mapping the /nix/store source prefixes to URLs depending on the input spec11:38:16
@emilazy:matrix.orgemilyit might be omitted for obscure evaluation caching reasons I guess11:38:44
@emilazy:matrix.orgemilythough the benefit seems marginal11:38:53
@raphi:tapesoftware.netraphi builtins.readFile ./flake.lock is probably the best you're going to get 11:51:01
@crtified:crtified.meCRTified

Wow, that might actually work?

builtins.fromJSON (builtins.readFile (self.outPath + "/flake.lock"))
11:53:27
@crtified:crtified.meCRTified

I mean:

nix-repl> :lf .
Added 15 variables.

nix-repl> test
{ nodes = { ... }; root = "root"; version = 7; }
11:53:59
@crtified:crtified.meCRTified *

Wow, that might actually work?

test = builtins.fromJSON (builtins.readFile (self.outPath + "/flake.lock"));
11:54:06
@emilazy:matrix.orgemilyoh that's utterly horrible :)11:55:46

Show newer messages


Back to Room ListRoom Version: 6