From 177b2522b5e6d56b70ee60cc1709f811742eb3ab Mon Sep 17 00:00:00 2001 From: Xiangyan Sun Date: Thu, 23 Apr 2026 12:00:51 -0700 Subject: [PATCH] typical: 0.12.1 -> 0.15.0 --- pkgs/by-name/ty/typical/lifetime.patch | 13 ------------- pkgs/by-name/ty/typical/package.nix | 17 ++++++++--------- 2 files changed, 8 insertions(+), 22 deletions(-) delete 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 deleted file mode 100644 index 24f7353ae1f4..000000000000 --- a/pkgs/by-name/ty/typical/lifetime.patch +++ /dev/null @@ -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() - } - } diff --git a/pkgs/by-name/ty/typical/package.nix b/pkgs/by-name/ty/typical/package.nix index 624f00a9985f..450b53ef0b87 100644 --- a/pkgs/by-name/ty/typical/package.nix +++ b/pkgs/by-name/ty/typical/package.nix @@ -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";