mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: +typst-bot
This commit is contained in:
parent
8b63d355bc
commit
efe3e2933d
2 changed files with 37 additions and 0 deletions
36
nix/packages/typst-bot.nix
Normal file
36
nix/packages/typst-bot.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
|
||||
lib,
|
||||
}:
|
||||
|
||||
let
|
||||
rev = "6be5470fcb19e857f76ede9a7f0c96cac63e3abc";
|
||||
in
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "typst-bot";
|
||||
version = lib.substring 0 8 rev;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mattfbacon";
|
||||
repo = "typst-bot";
|
||||
inherit rev;
|
||||
hash = "sha256-G3tcyFiHeVH77YT2NeIXS/U1GvqGJBw8o26AlBUc4ok=";
|
||||
};
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
cargoBuildFlags = [ "--workspace" ];
|
||||
|
||||
cargoLock = {
|
||||
lockFile = "${src}/Cargo.lock";
|
||||
outputHashes = {
|
||||
"poise-0.6.1" = "sha256-AZtF5P7E5xzHJcNdc1k61P2Rr8vIt+oun9vFYSr0nSc=";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue