typical: fix build (#404654)

This commit is contained in:
Pol Dellaiera
2025-05-06 23:21:40 +02:00
committed by GitHub
2 changed files with 19 additions and 0 deletions
+13
View File
@@ -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()
}
}
+6
View File
@@ -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) \