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

deepfilternet: fix compilation with Rust 1.80 #334838

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

Mrmaxmeier
Copy link
Contributor

@Mrmaxmeier Mrmaxmeier commented Aug 15, 2024

As per #332957, rust-lang/rust#127343. Bumps the time dependency in Cargo.lock, to fix a compilation issue.

Xref #333227 for a similar PR :)

Upstream issue:
Rikorose/DeepFilterNet#602

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

As per NixOS#332957, rust-lang/rust#127343. Bumps the time dependency in
Cargo.lock, to fix a compilation issue.

Xref NixOS#333227 for a similar PR :)

Upstream issue:
Rikorose/DeepFilterNet#602
@Mrmaxmeier
Copy link
Contributor Author

Welp, turns out this is a is a duplicate of #334835

@@ -15,6 +15,11 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-5bYbfO1kmduNm9YV5niaaPvRIDRmPt4QOX7eKpK+sWY=";
};

cargoPatches = [
# Fix compilation with Rust 1.80 (https://github.com/NixOS/nixpkgs/issues/332957)
./cargo-lock-bump-time.patch
Copy link
Member

Choose a reason for hiding this comment

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

Can we symlink the Cargo.lock into place, rather than having to have both a Cargo.lock file and a patch file? Like in #334818.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kind of like this approach since its clearly bound to the package version that's being patched. It also communicates why the (updated) vendored Cargo.lock is necessary and what's changed.

It seems like the linked PR might cause strange situations when the underlying reason for the patch is made redundant by an upstream release, since there won't be a "patch doesn't apply anymore" to nudge maintainers.

Let me know if this seems reasonable to you. I'm new-ish to Nix packaging so my hunch might be off here 🙂

Copy link
Member

Choose a reason for hiding this comment

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

I think you're quite right, and this is a good instinct. In this case, I think a comment would probably be enough to get it removed on update — it's right there below the source hash, which has to be updated anyway. I regret not asking for that on the other PR.

@SuperSandro2000 SuperSandro2000 merged commit d7f6863 into NixOS:master Aug 16, 2024
40 of 41 checks passed
@Mrmaxmeier Mrmaxmeier deleted the deepfilternet-rust-1-80 branch August 16, 2024 22:05
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/rustc-explain-e0282-error-could-not-compile-time-lib/50765/4

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.

4 participants