Local nixpkgs derivation added using buildRustPackage#53
Local nixpkgs derivation added using buildRustPackage#53cachebag merged 2 commits intocachebag:masterfrom
Conversation
cachebag
left a comment
There was a problem hiding this comment.
This looks good! I don't mind adding these in I'm happy to support Nix packaging.
My current flake.nix does this right now
Line 60 in 31a41f4
I'm not the most adept with this since I don't use Nix; but would you need to replace this with a call to the new package.nix so that nix build uses the actual nixpkgs-style derivation? I currently error out on nix build, which I assume is due to the flake still using naersk.
If so could you throw that patch in here really quick and I'll merge.
Thanks so much again!
|
Oh one note -- So the command to test the derivation is In this circumstance, the way to look at it is so that default.nix and package.nix are for deployment, and shell.nix is the development environment. |
|
Also fwiw, you may not need this because you're not using nixos for dev, but those dependencies i just added will make your flake.nix work on nixos, especially on systems that aren't running gnome/gtk |
|
@joncorv |
|
The holidays are going to hit for me here in the next few days, but I'll get this up on nixpkgs for you when i have a sec. I'm happy to maintain the versioning so nix keeps up with your latest releases too. I'll add both of us as maintainers on the nixpkgs repository. So if I die, or decide to become a hippy and move into a commune in the middle of nowhere, you'll still be able to go in and update things. It's pretty easy, since you'll just essentially need to update the version number to whatever your version # tag is on your release on Github, and as long as the dependencies haven't changed, it will take care of the rest. Anyway, cool tool man. Looking forward to having it on Nix! oh ps --- here is what info goes up in the nixpkgs maintainer repository. just let me know what info to add for you. List of active NixOS maintainers. handle = {
# Required
name = "Your name";
github = "GithubUsername";
githubId = your-github-id;where
here are a few examples of other peoples: Acconut = {
email = "marius@transloadit.com";
github = "Acconut";
githubId = 1375043;
name = "Marius Kleidl";
};
acesyde = {
name = "Pierre-Emmanuel Mercier";
email = "acesyde@gmail.com";
github = "acesyde";
githubId = 958435;
}; |
|
@joncorv Here you go: cachebag = {
email = "alhakimiakrmj@gmail.com";
github = "cachebag";
githubId = 111914307;
name = "Akrm Al-Hakimi";
}; |
|
ok i just submitted the pull request to nixpkgs. you are added as a maintainer to the repository as well. i'll keep an eye on it. |
hi hi hello,
I love this tool. great work.
so for submitting to nixpkgs, external overlays are not allowed, so you must implement buildRustPackage.
So -- this default.nix / package.nix allows you to test locally that your app will compile on the CI / CD platform for nix. From the repository root, you would just need to run "nix build" and it will error if any dependencies are not met. Please note that when the cargo.lock changes the cargoHash String will need to be updated. You'll need to remove the hash to be an empty string for the CLI tool to give you the actual new hash.
Last thing --- for the submission to nixpkgs, this will need to be tweaked with some nix specific hooks, and it will instead of build locally, it will build from your github based on a a tagged version / release. I can help with that, but I would need you to be comfortable with 2 new files in your repository root, or else it's annoying to test your app in the future when new versions are released and the nixpkgs package.nix is updated.
OK Thanks. let me know what you think.