From c0d18af092387f5dcbf661e480db928c72d51e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 31 Dec 2025 17:30:04 +0100 Subject: [PATCH] packages/typst-bot: use finalAttrs --- nix/packages/by-name/typst-bot/package.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/nix/packages/by-name/typst-bot/package.nix b/nix/packages/by-name/typst-bot/package.nix index f7a50b00..ffca5ea8 100644 --- a/nix/packages/by-name/typst-bot/package.nix +++ b/nix/packages/by-name/typst-bot/package.nix @@ -3,23 +3,20 @@ rustPlatform, fetchFromGitHub, }: -let - rev = "c9d4b164ff5dc2567bb0de3876460e51da62ba94"; -in rustPlatform.buildRustPackage (finalAttrs: { pname = "typst-bot"; - version = lib.substring 0 8 rev; + version = lib.substring 0 8 finalAttrs.src.rev; src = fetchFromGitHub { owner = "mattfbacon"; repo = "typst-bot"; - inherit rev; + rev = "c9d4b164ff5dc2567bb0de3876460e51da62ba94"; hash = "sha256-tB+zrE5p7zOloOgoP2fmFsajd4IBf94ET1v/0W3aNcM="; }; preBuild = '' # Don't use the upstream way of embedding the git rev - echo 'fn main() { println!("cargo:rustc-env=BUILD_SHA=${rev}"); }' > crates/bot/build.rs + echo 'fn main() { println!("cargo:rustc-env=BUILD_SHA=${finalAttrs.src.rev}"); }' > crates/bot/build.rs # Patch the command calling the worker by name. substituteInPlace crates/bot/src/worker.rs --replace-fail \