mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:39:39 +00:00
packages/typst-bot: use finalAttrs
This commit is contained in:
parent
8782f05477
commit
c0d18af092
1 changed files with 3 additions and 6 deletions
|
|
@ -3,23 +3,20 @@
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
rev = "c9d4b164ff5dc2567bb0de3876460e51da62ba94";
|
|
||||||
in
|
|
||||||
rustPlatform.buildRustPackage (finalAttrs: {
|
rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
pname = "typst-bot";
|
pname = "typst-bot";
|
||||||
version = lib.substring 0 8 rev;
|
version = lib.substring 0 8 finalAttrs.src.rev;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "mattfbacon";
|
owner = "mattfbacon";
|
||||||
repo = "typst-bot";
|
repo = "typst-bot";
|
||||||
inherit rev;
|
rev = "c9d4b164ff5dc2567bb0de3876460e51da62ba94";
|
||||||
hash = "sha256-tB+zrE5p7zOloOgoP2fmFsajd4IBf94ET1v/0W3aNcM=";
|
hash = "sha256-tB+zrE5p7zOloOgoP2fmFsajd4IBf94ET1v/0W3aNcM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
# Don't use the upstream way of embedding the git rev
|
# 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.
|
# Patch the command calling the worker by name.
|
||||||
substituteInPlace crates/bot/src/worker.rs --replace-fail \
|
substituteInPlace crates/bot/src/worker.rs --replace-fail \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue