ChanServ changed the topic of #nixos-nur to: Nix User Repository || https://github.com/nix-community/NUR || https://logs.nix.samueldr.com/nixos-nur
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #nixos-nur
ma27 has quit [Quit: WeeChat 2.2]
ma27 has joined #nixos-nur
<sphalerite> I think it would be nice to have nur in nixpkgs itself, maybe guarded behind a setting. Any opinions?
<Mic92> sphalerite: there was recently a discussion between infinisil and tilpner on the 8th september.
<Mic92> about this
<sphalerite> oh so there was
<infinisil> Yeah, it could work with some changes
<Mic92> infinisil: updating can be also done by by adding a nix channel for: https://github.com/nix-community/nur-channel/archive/master.tar.gz
<Mic92> to update your declarative pinnings, there could be also a website that prints git ref + hash.
<Mic92> this a bit less annyoing.
<sphalerite> oooh and have nur = let result = tryEval (import <nur> { pkgs = self; }); in if result.success then result.value else throw "Please add NUR channel bla bla bla";
<infinisil> I personally like the idea of using increasing integers to do the pinning, it's a bit unconventional but would be pretty cool
<infinisil> And seems to be the only way for having NUR properly work in nixpkgs, with pinning support
<Mic92> infinisil: maybe a web service that redirects a revision number to the git commit?
<Mic92> this should work because we never change history.
<Mic92> or we need a svn mirror :)
<infinisil> Hmm maybe
<infinisil> But then NUR would rely on that web service to work, which I'm not a fan of
<Mic92> I am still hoping the webservice is github.
<Mic92> maybe they have some sort of api for that
<Mic92> travis could add tags ...
<infinisil> So how would `nur = ???` look like then in nixpkgs?
<sphalerite> :D
<Mic92> I think adding a tag for each repo update is feasible.
<infinisil> I new tag a day?
<Mic92> There could be different conventions.
<Mic92> one for every day and one for each update
<Mic92> as long as the names are predictable.
<infinisil> So you'd have `nur = tag: builtins.fetchTarball "https://github.com/nix-community/NUR/archive/${tag}.tar.gz";` in nixpkgs?
<Mic92> yes.
<infinisil> Or `nur = { tag ? "master" }: ...`
<infinisil> Yeah that could work
<samueldr> apparently tags don't really scale well in git repos, maybe not an issue now, but could become one
<Mic92> samueldr: how bad is it?
<samueldr> [citation needed]
<infinisil> > 5 * 365
<infinisil> Oh, no bot here
<infinisil> 1825 tags in 5 years
<samueldr> reporting from the question "how about tagging every channel updates?"
<Mic92> I heard microsoft has tones of branches in there mono repo.
<Mic92> samueldr: was this not related to the git protocol, which had some in-efficiency?
<samueldr> no idea, I would classify this as cargo-culted knowledge
<Mic92> I read in the last git changelog that they fixed that and also support this protocol in github.
<samueldr> but from reliable sources
<Mic92> we are far away from 500k branches.
<samueldr> haha, though those discussions might have been held before or during the month of may
<infinisil> Oh and how about that (not sure if you meant that samueldr): When nixpkgs gets branched off for release, we change the nur definition to `nur = { tag ? "2018-09-01" }: if tag == "2018-09-01" then builtins.fetchTarball { url = ".../${tag}.tar.gz"; sha256 = "..."; } else builtins.fetchTarball "../${tag}.tar.gz";`
<infinisil> Such that stable releases have a non-master version as default, so people get a stable version automatically
<samueldr> (and I just blindly trusted the answers of "tags don't scale")
<Mic92> infinisil: what if we get the tag from the nixpkgs version?
<Mic92> is this possible?
<infinisil> OH
<infinisil> neat
<infinisil> Much better
<infinisil> Could even do it automatically based on .version-prefix
<infinisil> .version-suffix I mean
<Mic92> also only because nixpkgs and nur are forcely kept in sync does not mean they work together.
<Mic92> it could be that a later version of nur fixes the evaluation with the current nixpkgs revision.
<Mic92> That's beeing that, having an option for users to pin a revision they are happy with is a good idea, but not pinning by default might be a sensible default.
<Mic92> After all I don't see how we could support stable without support from the individual repo maintainers.
<Mic92> They would need to commit on what they want to support.
<Mic92> Supporting stable releases is however probably something we need support, if we want to be in nixpkgs.
<Mic92> or else we would not include nixpkgs in any release.
<Mic92> An alternative would be to lock the nixpkgs revision in nur instead of the other way around.
<Mic92> at the price of more expansive evaluation.
<infinisil> Mic92: Good point
<sphalerite> actually you know what, I think the status quo is fine :')
<Mic92> We could also tell users who want to use NUR in stable to import unstable channel as pkgs = source.
<infinisil> sphalerite: Meh
<Mic92> I think the tags is something we could add anyway, because there are handy - independently how we use them.
<infinisil> It would be cool to be able to do `(import <nixpkgs/lib>).nur.paul.foo` to get `nur.repos.paul.lib.foo`
<infinisil> People could then easily distribute library functions usable in nixos modules
<sphalerite> that seems confusing. Why not just use (import <nixpkgs>).nur.paul.lib.foo?
<sphalerite> whoops plus a {}
<infinisil> sphalerite: Because that won't work with nixos modules and stuff
<infinisil> Infinite recursion and such
<infinisil> Ah wait
<infinisil> Yeah
<tilpner> Please no dependency on NIX_PATH :/
<Mic92> there is no dependencies, but you have to supply an additional argument then.
<Mic92> *dependency on NIX_PATH