Implicit dependence on github

Please consider:

petrockette@felicette:~$ nix run ./src/petockette/nix/cowfortune/
_____________________________________
/ Two wrights don’t make a rong, they \
\ make an airplane. Or bicycles. /

    \\   ^\_\_^ 
     \\  (oo)\\\______\_ 
        (\_\_)\\       )\\/\\ 
            ||----w | 
            ||     || 

petrockette@felicette:~$ nix run src/petrockette/nix/cowfortune/
error: GitHub URL ‘flake:src/petrockette/nix/cowfortune/’ is invalid

Should nix be so closely tied to GitHub? On principle, I would prefer it to be both revision control system neutral (I prefer Darcs to Git), but maybe more importantly, repository neutral, internal or external.

Perhaps it made more sense when GitHub was independent and not being scraped and stolen by commercial LLM companies and served as a common resource for sharing, but I wonder if that time has passed both with disregard for open source licences and unremittent LLM slop.

I am suggesting that GitHub, and even git, should require explicit parameters as everything else does, particularly as it has become unreliable from what I guess is Microsoft pushing vibe coding

4 Likes

I can’t guarantee you’ll succeed, but consider submitting a PR. It is unlikely that anyone will make this change for you.

What version of nix are you using? Mine does not say anything about GitHub:

$ nix run Projects/jj-nixpkgs#cowsay
error: cannot find flake 'flake:Projects/jj-nixpkgs' in the flake registries

And this message doesn’t have changed in the last 5ish years I do use flakes.


Anyway the mention of GitHub in your error message is superfluous, misleading even, as GH is unrelated to the error.

Though I have to admit, GH is indeed tightly coupled into the infrastructure and I think it’ll be hard to impossible to move away.

And that is also unrelated to the fact that flakes prefer to be backed by a supported VCS, of which Darcs is not one.

Personally I’d love to see more VCS being supported or at least a way to add support via a plugin.

3 Likes

Granted, in whatever version of nix that is it probably is less misleading. It’ll have to be a good 7 years or something out of date, though.

This doesn’t really apply to nix itself, though, right? NixOS and nixpkgs are tied into the platform pretty hard because they’re developed on it, so using the ecosystem without touching GH is hard, but nix itself doesn’t really rely on it as anything but a git forge.

Not necessarily to nix the program, though seeing the broader official ecosystem, sure, it is tightly tied to GH, you can not move nix to codeberg while keeping everything else on GH.

2 Likes

Seems to be nearly exactly 6 years since the message got removed…

commit 5633c0975b9dec6bceaa85003223a346d7d1bd0b
Author: Eelco Dolstra <edolstra@gmail.com>
Date:   Fri May 29 14:23:32 2020 +0200

I only skimmed the content, though it has lines touching various errors about "GitHub URL"s.

Isn’t that this message?

At first glance, it seems to be a miswritten or oversimplified message. It is emitted when the flake URL has (zero? or) more than three parts, regardless of the forge used.

2 Likes

Oh, this is an interesting edge case.

Yeah that message really should get fixed!

I should have scanned the current source code as well, not only history…

Also, looks like it’s not present in lix anymore, which may or may not be what you’re actually using: https://git.lix.systems/lix-project/lix/src/branch/main/lix/libfetchers/indirect.cc#L48

2 Likes