{ rustPlatform, fetchFromGitHub, lib, git, rust-bin, ... }: rustPlatform.buildRustPackage rec { pname = "typst-cli"; version = "v0.3.0"; cargoBuildFlags = "-p typst-cli"; cargoLock = { lockFile = "${src}/Cargo.lock"; outputHashes = { "iai-0.1.1" = "sha256-EdNzCPht5chg7uF9O8CtPWR/bzSYyfYIXNdLltqdlR0="; }; }; src = fetchFromGitHub { owner = "typst"; repo = "typst"; sha256 = "sha256-JCsHNPQ9WHqq1Qg2j3TjRr0RCnwS8X3/K/n8FXYE8D4="; rev = version; leaveDotGit = true; }; # the build.rs script wants a version hash from git. nativeBuildInputs = [ git rust-bin.stable.latest.minimal ]; }