-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
kime can not complied at rustc 1.82(stable) #688
Comments
For NixOS users who use nixos-unstable branch, you might need to use rust-overlay since current nixpkgs version is 1.82.0.
{ inputs, ... }:
{
nixpkgs.overlays = [
inputs.rust-overlay.overlays.default
(final: prev: {
kime = prev.callPackage ./package.nix {
inherit (final) rust-bin;
};
})
];
}
diff --git a/package.nix b/package.nix
index 6d7759a..ac93671 100644
--- a/package.nix
+++ b/package.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, rustPlatform, rustc, cargo, fetchFromGitHub, pkg-config, cmake, extra-cmake-modules
+{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, cmake, extra-cmake-modules, rust-bin, makeRustPlatform
, withWayland ? true
, withIndicator ? true, dbus, libdbusmenu
, withXim ? true, xorg, cairo
@@ -15,6 +15,12 @@ let
++ lib.optionals withQt6 ["-DENABLE_QT6=ON"];
optFlag = w: (if w then "1" else "0");
+
+ rust181 = rust-bin.stable."1.81.0".default;
+ customRustPlatform = makeRustPlatform {
+ cargo = rust181;
+ rustc = rust181;
+ };
in
stdenv.mkDerivation (finalAttrs: {
pname = "kime";
@@ -97,10 +103,9 @@ stdenv.mkDerivation (finalAttrs: {
pkg-config
cmake
extra-cmake-modules
- rustPlatform.bindgenHook
- rustPlatform.cargoSetupHook
- rustc
- cargo
+ customRustPlatform.bindgenHook
+ customRustPlatform.cargoSetupHook
+ rust181
];
RUST_BACKTRACE = 1; |
Are there any ways to fix it? |
Seems like this is caused by rust-lang/rust#128370 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This error occurs with rustc >= 1.82, but succeeds with version 1.81.
can add
rust-toolchain.toml
?The text was updated successfully, but these errors were encountered: