From a676aa1531d2f4263b52600fc63be39b60bcceb0 Mon Sep 17 00:00:00 2001 From: aleksana Date: Sun, 24 Mar 2024 01:40:07 +0800 Subject: [PATCH] chromatic: fix build --- pkgs/by-name/ch/chromatic/package.nix | 9 ++++++++- .../ch/chromatic/rustc_serialize_update.patch | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/ch/chromatic/rustc_serialize_update.patch diff --git a/pkgs/by-name/ch/chromatic/package.nix b/pkgs/by-name/ch/chromatic/package.nix index 7eaae7818543..0598bababaa6 100644 --- a/pkgs/by-name/ch/chromatic/package.nix +++ b/pkgs/by-name/ch/chromatic/package.nix @@ -26,10 +26,17 @@ stdenv.mkDerivation rec { hash = "sha256-E3v3UoQumBBYDOiXMfCRh5J7bfUCkettHth7SAresCE="; }; + patches = [ + # solve error[E0310]: the parameter type `T` may not live long enough + # in rust-serialize crate + ./rustc_serialize_update.patch + ]; + cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-M3UMeGkLf57/I/9BIkyiMpOvjbKQJrOk+axf05vRoW0="; + patches = [ ./rustc_serialize_update.patch ]; + hash = "sha256-1Zb0J2tO/gIifDymmoXxZf6RNV8foE9QiQqZcrHrWzE="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ch/chromatic/rustc_serialize_update.patch b/pkgs/by-name/ch/chromatic/rustc_serialize_update.patch new file mode 100644 index 000000000000..fa56db4d5399 --- /dev/null +++ b/pkgs/by-name/ch/chromatic/rustc_serialize_update.patch @@ -0,0 +1,16 @@ +diff --git a/Cargo.lock b/Cargo.lock +index ab2add4..7740629 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -1031,9 +1031,9 @@ checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" + + [[package]] + name = "rustc-serialize" +-version = "0.3.24" ++version = "0.3.25" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" ++checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401" + + [[package]] + name = "rustc_version"