-
Notifications
You must be signed in to change notification settings - Fork 286
Add nix build file #110
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
Add nix build file #110
Conversation
Create a default.nix to enable the nix-build command. Also enable git tracking of Cargo.toml to build it with nix. default.nix contains a Sha256Sum of the Cargo.lock file
Just ran |
I think changing it would be a good way, because the |
Understood. Do you think you could change the Travis-CI config to test |
Removed notifications, because it is unknown to travis lint
The nix script should have been nix-build, but it wasn't
Added it to Travis-CI, but only with nix under linux. How about nixpkgs, shall I make a PR into nixpkgs, after this PR is merged, or do you want to make it? |
Sorry, pressed a wrong button
Yes, the submitter to nixpkgs should be the one in the |
Sure @kloenk, as long you can keep an eye on the project and update the package each time a new release is made, you can be the maintainer. |
branches: | ||
only: | ||
- master | ||
- cargo build --verbose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to merging your PR 👍 ! Just one quick question:
Why move cargo build
below cargo test
? Tests require a successful build. If the project has not been built, cargo test
will build it, so building after tests have run successfully is a bit redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No very good reason, personally I would first execute the tests, and then build, but that's the complete reason. But we maybe should change the cargo build
to --release
, and then there are different builds, which makes it irrelevant.
So, Should I change it, or make cargo build a release build?
Ok, I will make a PR to nixpkgs, as soon as this PR is merged, and the version has been bumped, because I need a version I can refer as a tag, and the Cargo.lock inside this version. |
buildRustPackage provides a default value, which includes windows, which I forgot, so onefetch can also installed under windows via nix.
Create a default.nix to enable the nix-build command. Also, enable git
tracking of Cargo.toml to build it with nix.
default.nix contains a Sha256Sum of the Cargo.lock file.
This commit can also be used to provide an entrance to get onefetch in the nixpkgs package repository, so every nix user can use it. If requested I can see that I get it into nixpkgs upstream
This pr resolves #109