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

get programs.sqlite with flakes #54

Open
wmertens opened this issue Dec 18, 2021 · 5 comments
Open

get programs.sqlite with flakes #54

wmertens opened this issue Dec 18, 2021 · 5 comments

Comments

@wmertens
Copy link

Now that we're moving towards flakes instead of channels, the injected programs.sqlite is no longer available.

What would be a good way to provide this information?

It could be injected in nixpkgs as a commit on the just-built branch, but that seems rather crude. Perhaps in a different repo that has the same branch names as the ones that hydra makes on nixpkgs?

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Dec 19, 2021

Putting it into the nixpkgs repo would blew up it's size by a lot. Wouldn't recommend that.

I am fetching it like this:

inputs.nixos-channel.url = "https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz";
programs.command-not-found = {
  enable = true;
  dbPath = "${inputs.nixos-channel}/programs.sqlite";
};

@wmertens
Copy link
Author

Well, the commits with the db would only go on build branches and so there wouldn't be a history of them. Every time a build branch is updated, the previous commit would no longer be referenced and eventually GC-ed.

What I don't like about your solution is downloading the whole channel to get only that single file.

@ElvishJerricco
Copy link

@wmertens The release-XX.YY branches just add new commits, so adding this DB to those branches would mean the history would be full of them, which is really bad since people actually do nixpkgs dev work on those branches. The nixos-XX.YY branches always just point to commits from the corresponding release branch.

@wamserma
Copy link
Member

Just for reference: https://github.com/wamserma/flake-programs-sqlite/ is basically a fancy wrapper around @SuperSandro2000's solution from above, which provides FODs for programs.sqlite.

@zimbatm
Copy link
Member

zimbatm commented Jul 12, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants