From 9dbdff0f93569ff5bb43d527ae4f3939fa45e119 Mon Sep 17 00:00:00 2001 From: xeals Date: Mon, 9 Sep 2024 17:01:04 +1000 Subject: [PATCH] numbat: 1.12.0 -> 1.13.0 --- pkgs/by-name/nu/numbat/package.nix | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/nu/numbat/package.nix b/pkgs/by-name/nu/numbat/package.nix index 829b1bf8a4a4f..3f54a6c5a8c5c 100644 --- a/pkgs/by-name/nu/numbat/package.nix +++ b/pkgs/by-name/nu/numbat/package.nix @@ -2,23 +2,33 @@ , stdenv , testers , fetchFromGitHub +, fetchpatch , rustPlatform , darwin , numbat +, tzdata }: rustPlatform.buildRustPackage rec { pname = "numbat"; - version = "1.12.0"; + version = "1.13.0"; src = fetchFromGitHub { owner = "sharkdp"; repo = "numbat"; rev = "v${version}"; - hash = "sha256-MYoNziQiyppftLPNM8cqEuNwUA4KCmtotQqDhgyef1E="; + hash = "sha256-o3EYhMFBgs/Ni+YCM3+RdUYlwRt+nMaEP/cAkDXMVHc="; }; - cargoHash = "sha256-t6vxJ0UIQJILCGv4PO5V4/QF5de/wtMQDkb8gPtE70E="; + cargoHash = "sha256-rK9RPd/hww2F87l/dd14pB4izE58NuqaewYaqMimV1M="; + + patches = [ + # https://github.com/sharkdp/numbat/pull/562 + (fetchpatch { + url = "https://github.com/sharkdp/numbat/commit/4756a1989ecdab35fd05ca18c721ed15d8cde2b1.patch"; + hash = "sha256-22+yePjy+MxJQ60EdvgaTw/IVV0d/wS2Iqza1p1xmfk="; + }) + ]; buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security @@ -31,6 +41,13 @@ rustPlatform.buildRustPackage rec { cp -r $src/numbat/modules $out/share/numbat/ ''; + preCheck = '' + # The datetime library used by Numbat, "jiff", always attempts to use the + # system TZDIR on Unix and doesn't fall back to the embedded tzdb when not + # present. + export TZDIR=${tzdata}/share/zoneinfo + ''; + passthru.tests.version = testers.testVersion { package = numbat; }; @@ -46,5 +63,7 @@ rustPlatform.buildRustPackage rec { license = with licenses; [ asl20 mit ]; mainProgram = "numbat"; maintainers = with maintainers; [ giomf atemu ]; + # Failing tests on Darwin. + broken = stdenv.isDarwin; }; }