Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move go & ruby dependencies into go-packages.nix & ruby-packages.nix #52595

Open
matthewbauer opened this issue Dec 20, 2018 · 2 comments
Open
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@matthewbauer
Copy link
Member

Issue description

Right now, we have lots of deps.nix (for go) & gemset.nix (for ruby). This takes up a lot of space and there appears to be at least some duplication. For instance "github.com/gorilla/websocket" is listed 14 times:

https://github.com/NixOS/nixpkgs/search?q=github.com%2Fgorilla%2Fwebsocket&unscoped_q=github.com%2Fgorilla%2Fwebsocket

Would it be possible to merge these into a ruby-packages.nix & go-packages.nix? We can keep the applications as their own files, but ideally we could avoid the duplication in the depencies.

@FRidh
Copy link
Member

FRidh commented Dec 29, 2018

As with the packaging of most languages, a package lists it's abstract dependencies, and a resolver is used to generate a set of concrete dependencies. With this approach, it's quite common applications may use different versions of dependencies. While we can handle one part easily with our store paths, the question is how to store the names, versions, urls and hashes of these packages.

With the lock file approach, one typically generates an expression containing all dependencies, per package. Now, we could have an index listing all combinations of names and versions, but these tend to get way too big. Therefore, I think we need to find a generic way to generate sets per package, and then be able to join them in order to reduce maintenance in case patches are needed.

For that to happen, packages that require these types of dependencies, should declare so. We could then have an update script that, e.g., finds all Go applications, generates their dependency sets, and merges them.

I think it makes sense to generate a Nix expression for every application, however, we should have a way of joining expressions.

Related thread on generated data in Nixpkgs: #15480

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

2 participants