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

[WIP] pijul: 0.8.0 -> 0.10.0 #39287

Closed
wants to merge 3 commits into from
Closed

Conversation

infinisil
Copy link
Member

@infinisil infinisil commented Apr 20, 2018

Motivation for this change

Pijul 0.10.0 is now available on crates.io, which seems to be the only way to fetch it for now. This is WIP because it includes a hack to build the binary from the crate (which doesn't include a Cargo.lock, so the hash might change with future builds) fixed with third commit, still includes little postFetch hack to inject Cargo.lock file though.

I will update this PR when Pijul 0.10.0 is available from their download page, such that the hack can be removed and this PR be merged.

I provide this PR now for people that wanna try out Pijul with nest.pijul.org (which now requires 0.10.0 to work I believe).

Related is #35225

Ping @P-E-Meunier @grahamc @Ralith @lheckemann @Ekleog

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Removes the hacky carge update
version = version;
sha256 = "0q2hmavsnmmpb1lmq774wdz9yy3m7j2j47l0s2n1715yg7pv42jg";
extraPostFetch = ''
cp ${./Cargo.lock} $out/Cargo.lock
Copy link
Member

@Mic92 Mic92 Apr 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to avoid adding large files to nixpkgs. Can you make this a gist or git source?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally also with a comment on how to update it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the hack I also don't want in nixpkgs, it's not needed once the download page has the new version

@P-E-Meunier
Copy link
Contributor

Wait, this should ideally be done via Carnix. @infinisil, if you don't want to do this, I can do it as well, just tell me.

@infinisil
Copy link
Member Author

@P-E-Meunier I had trouble with the Cargo.lock file from the Nest, it seemed to be a patch with >>>>>>> lines (when cloning locally and viewing raw online). That's why I used cargo update to get the current Cargo.lock.

I can do the carnix thing if there is an 'official' Cargo.lock file. Why not just use buildRustPackage though? As @Mic92 said huge files are being avoided if possible, and buildRustPackage does indeed not need a big file.

@P-E-Meunier
Copy link
Contributor

There is an official Cargo.lock file, you said it had a conflict. Pushing a patch that fixes that conflict would be more useful than creating a potentially different Cargo.lock.

Carnix is smarter than buildRustPackage, because it reuses other crates that might have been built on the same system, instead of rebuilding the universe from scratch.

@infinisil
Copy link
Member Author

I see, well I've never actually used Pijul or Rust more than 10 minutes, so I'm pretty inexperienced with this (I even did more Rust packaging for nixpkgs than that :P). Feel free to open your own PR with how you intend to have it in nixpkgs, I'll then close this one.

@P-E-Meunier
Copy link
Contributor

Ok, sorry, I didn't know. How about you try Carnix again with the corrected Cargo.lock from the Nest, and ping me at will if that doesn't work? In my experience, Carnix is a much better way of using Rust on NixOS than previous solutions (which is exactly why I wrote it), and we need to use it in order to improve it.

@yrashk
Copy link
Contributor

yrashk commented Apr 21, 2018

Here's an alternative attempt to implement this: #39313 (based on my previous work on 0.8.3 migration)

@P-E-Meunier
Copy link
Contributor

Here is another alternative using Carnix: #39317.

@infinisil
Copy link
Member Author

Closing in favor of #39317

@infinisil infinisil closed this Apr 28, 2018
@infinisil infinisil deleted the update/pijul branch May 19, 2018 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants