ChanServ changed the topic of #nixos-nur to: Nix User Repository || https://github.com/nix-community/NUR || https://logs.nix.samueldr.com/nixos-nur
<sphalerite> Mic92: very nice!
<Mic92> infinisil: I need you package attribute position hack as a fallback for the nur search in case it cannot find the location of name.
<infinisil> Not sure what you're saying
<Mic92> infinisil: was it you who had this bot, that can tell where in all-packages.nix an attribute was defined?
<infinisil> Ahhh yeah
<infinisil> > viewSource hello
<infinisil> Oh, bot not here
<infinisil> This one?
<Mic92> infinisil: yes
<infinisil> Would reply with "all-packages.nix:16845 hello = callPackage ../applications/misc/hello { };"
<infinisil> I don't have the full implementation written down, I coded it just by assigning variables in the bot
<infinisil> Hmm..
<infinisil> Mic92: It's really just powered by builtins.unsafeGetAttrPos underneath
<infinisil> Plus some hackery
<Mic92> infinisil: this is fine
<infinisil> Mic92: So you want to map over a repository and add position information for where this repo is defined? So nur.repos.paul.pos should be an url pointing to nur-combined where there's `paul = { ... };`?
<Mic92> infinisil: I want to link attributes to their source, if you have over the attribute links for all the packages here: https://nix-community.github.io/nur-search/repos/mic92/
<Mic92> you are refererred to a nix-combined link
<Mic92> s/over/hover/
<Mic92> s/nix-combined/nur-combined/
<infinisil> What's the problem with the current approach? Sorry I still don't quiet get it
<Mic92> infinisil: sometimes it does not work and I added an fallback to the repository directory.
<Mic92> for example eapol_test
<infinisil> Ah I see
<infinisil> The thing I did with viewSource won't help with that though
<infinisil> On a language level it's only possible to get where an attribute is declared, so it would only get you here: https://github.com/nix-community/nur-combined/blob/master/repos/mic92/default.nix#L15
<Mic92> infinisil: yes, this is already better then what I do at the moment.
<infinisil> Alright, so all that's needed for this is `builtins.unsafeGetAttrPos "eapol_test" nur.repos.mic92`
<Mic92> thanks
<infinisil> Mic92: (the thing I coded in the bot here is mostly the part of actually reading the given line out and display it, which is surprisingly hard in Nix with all-packages.nix)