typical: 0.12.1 -> 0.15.0 (#512871)

This commit is contained in:
Peder Bergebakken Sundt
2026-04-25 00:45:00 +00:00
committed by GitHub
2 changed files with 8 additions and 22 deletions
-13
View File
@@ -1,13 +0,0 @@
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()
}
}
+8 -9
View File
@@ -4,20 +4,21 @@
fetchFromGitHub,
installShellFiles,
stdenv,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "typical";
version = "0.12.1";
version = "0.15.0";
src = fetchFromGitHub {
owner = "stepchowfun";
repo = "typical";
rev = "v${finalAttrs.version}";
hash = "sha256-y7PWTzD9+rkC4wZYhecmDTa3AoWl4Tgh7QXbSK4Qq5Q=";
hash = "sha256-gcaOQhEyCiU2kXWZRymGca0Mq+TOBGDR4v/5sFOaDz0=";
};
cargoHash = "sha256-+SnwxmNQDj6acr2nEKJkNmR5PqnTIvyMApyZOmCld2U=";
cargoHash = "sha256-cRlxyh8a+lJLc/YkOYYXkCEi8D3KJHlm5a01rhWk3VQ=";
nativeBuildInputs = [
installShellFiles
@@ -27,12 +28,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
export NO_COLOR=true
'';
patches = [
# Related to https://github.com/stepchowfun/typical/pull/501
# Committing 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) \
@@ -40,6 +35,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
--zsh <($out/bin/typical shell-completion zsh)
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
meta = {
description = "Data interchange with algebraic data types";
mainProgram = "typical";