From 39385e4e3be03b0baa8c1aa44fa4cc8caf0b5da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 6 May 2025 16:17:39 +0200 Subject: [PATCH] typical: fix build --- pkgs/by-name/ty/typical/lifetime.patch | 13 +++++++++++++ pkgs/by-name/ty/typical/package.nix | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 pkgs/by-name/ty/typical/lifetime.patch diff --git a/pkgs/by-name/ty/typical/lifetime.patch b/pkgs/by-name/ty/typical/lifetime.patch new file mode 100644 index 000000000000..24f7353ae1f4 --- /dev/null +++ b/pkgs/by-name/ty/typical/lifetime.patch @@ -0,0 +1,13 @@ +diff --git a/src/error.rs b/src/error.rs +index 4563e1e..050610d 100644 +--- a/src/error.rs ++++ b/src/error.rs +@@ -34,7 +34,7 @@ impl fmt::Display for Error { + } + + impl error::Error for Error { +- fn source<'a>(&'a self) -> Option<&(dyn error::Error + 'static)> { ++ fn source(&self) -> Option<&(dyn error::Error + 'static)> { + self.reason.as_deref() + } + } diff --git a/pkgs/by-name/ty/typical/package.nix b/pkgs/by-name/ty/typical/package.nix index 7b3e508af9de..91c9d00d4db6 100644 --- a/pkgs/by-name/ty/typical/package.nix +++ b/pkgs/by-name/ty/typical/package.nix @@ -28,6 +28,12 @@ rustPlatform.buildRustPackage rec { export NO_COLOR=true ''; + patches = [ + # Related to https://github.com/stepchowfun/typical/pull/501 + # Commiting a slightly different patch because the upstream one doesn't apply cleanly + ./lifetime.patch + ]; + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd typical \ --bash <($out/bin/typical shell-completion bash) \