From d6667b575ff8db395500c2228ecced789b632ac7 Mon Sep 17 00:00:00 2001 From: Goldstein Date: Mon, 26 Aug 2024 18:54:22 +0300 Subject: [PATCH] silicon: patch `Cargo.lock` for Rust 1.80 See: https://github.com/NixOS/nixpkgs/issues/332957 --- pkgs/by-name/si/silicon/Cargo.lock | 16 ++++++++++++---- pkgs/by-name/si/silicon/package.nix | 6 ++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/si/silicon/Cargo.lock b/pkgs/by-name/si/silicon/Cargo.lock index 0133214e7095..a02f14068eb6 100644 --- a/pkgs/by-name/si/silicon/Cargo.lock +++ b/pkgs/by-name/si/silicon/Cargo.lock @@ -823,6 +823,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.45" @@ -1474,12 +1480,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -1494,10 +1501,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] diff --git a/pkgs/by-name/si/silicon/package.nix b/pkgs/by-name/si/silicon/package.nix index 18edc3b84948..cba16e706b8c 100644 --- a/pkgs/by-name/si/silicon/package.nix +++ b/pkgs/by-name/si/silicon/package.nix @@ -17,6 +17,7 @@ rustPlatform.buildRustPackage rec { pname = "silicon"; + # Remove `postPatch` hack below when updating. version = "0.5.2"; src = fetchFromGitHub { @@ -33,6 +34,11 @@ rustPlatform.buildRustPackage rec { }; }; + postPatch = '' + # Fix build with Rust 1.80; remove when fixed upstream + ln -sf ${./Cargo.lock} Cargo.lock + ''; + buildInputs = [ expat freetype fira-code fontconfig harfbuzz ] ++ lib.optionals stdenv.isLinux [ libxcb ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [