Skip to content

nix derivation #109

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

Closed
kloenk opened this issue Oct 24, 2019 · 13 comments · Fixed by #110
Closed

nix derivation #109

kloenk opened this issue Oct 24, 2019 · 13 comments · Fixed by #110
Labels
OS: Linux Operating system: Linux

Comments

@kloenk
Copy link
Contributor

kloenk commented Oct 24, 2019

I would like a Nix derivation, so one can build with nix-build, and maybe someone could even get it into nixpkgs, so it is available on any system running nix.
This feature would need a Cargo.lock file, and a default.nix, I will see that I build that files

@o2sh
Copy link
Owner

o2sh commented Oct 27, 2019

@kloenk the NixOs build just failed, any idea ?

@kloenk
Copy link
Contributor Author

kloenk commented Oct 27, 2019

yep, new rust source commits, but the sha256 sum in the default.nix was not updated.

line 19 in default.nix must have the value 0cpfjxn6nqsrnmgvjzr17n6xbbyfl9c91d5kbrmxb6jyig98k6aq

@spenserblack
Copy link
Collaborator

@kloenk, does this mean default.nix will need to be updated each time the master branch has been updated?

@kloenk
Copy link
Contributor Author

kloenk commented Oct 27, 2019

yes, because of the vendor sha256 sum

@o2sh
Copy link
Owner

o2sh commented Oct 27, 2019

yeah, we cannot keep that on the master branch.
Maybe create a second branch dedicated to test NixOs build.

But I think we should rollback the changes on the travis.yml file

@spenserblack
Copy link
Collaborator

Hmmm... 🤔 Perhaps it's best to not test the nix-build in the Travis build. At least not on the master branch. If nix-build must be pointed to specific commits, it would be irrelevant for testing PRs (since nix-build would be building a SHA, not the latest commit in the PR), and the build would fail at least once after each merged PR, since I don't think we can expect the maker of the PR to fix default.nix.

A possible solution I can think of is to have a separate branch just for nix-build. Set Travis to only test nix-build on this branch.

@o2sh
Copy link
Owner

o2sh commented Oct 27, 2019

@spenserblack we're in sync 😄

@kloenk
Copy link
Contributor Author

kloenk commented Oct 27, 2019

I agree that there is no need for the nix-build test.

If we delete the default.nix that's also fine with me, but please keep the Cargo.lock file updated, at least with every tagged version, because that is needed for a release in nixpkgs. the default.nix is not needed in this repo for the package there.

@spenserblack
Copy link
Collaborator

Makes sense to me 👍
I agree that Cargo.lock should remain tracked. I believe it's standard for binaries to have their lock files tracked when available.

@kloenk
Copy link
Contributor Author

kloenk commented Oct 29, 2019

I created a pr on nixpkgs for version 1.7.0

NixOS/nixpkgs#72254

@erikgaal erikgaal added the OS: Linux Operating system: Linux label Nov 10, 2019
@Br1ght0ne
Copy link

@kloenk I very much appreciate the effort you did in your PR, but there were a couple issues I found:

  • your default.nix uses some unusual idioms, indicated by the reviewers' comments
  • it specifies version 1.7.0, whether the current latest is 2.1.0
  • having default.nix in onefetch's repository doesn't help a lot - nixpkgs uses rustPlatform uniformly
  • there are some conflicts with the master branch as indicated by GitHub

I decided to create a new PR incorporating all these changes: NixOS/nixpkgs#74191

I consider it important for you to get all the necessary attribution. So, I added you as a co-author to my PR - that should count. Feel free to add yourself as a maintainer if you feel like it (probably in a separate PR, as you need to add yourself to the maintainers list beforehand).

If you have any questions - reach out to me. Thanks for your contributions!

@stale
Copy link

stale bot commented Aug 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 21, 2020
@Br1ght0ne
Copy link

As NixOS/nixpkgs#74191 has been merged, this issue can be closed.

@stale stale bot removed the wontfix label Aug 22, 2020
@kloenk kloenk closed this as completed Aug 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: Linux Operating system: Linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants