Unverified Commit 8169375d authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

typical: 0.12.1 -> 0.15.0 (#512871)

parents 7a517039 177b2522
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
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
Original line number Diff line number Diff line
@@ -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";