{ rustPlatform, fetchFromGitHub, lib, git, rust-bin, ... }: rustPlatform.buildRustPackage rec { pname = "typst-cli"; version = "v23-03-28"; cargoBuildFlags = "-p typst-cli"; cargoLock = { lockFile = "${src}/Cargo.lock"; outputHashes = { "iai-0.1.1" = "sha256-EdNzCPht5chg7uF9O8CtPWR/bzSYyfYIXNdLltqdlR0="; "lipsum-0.8.2" = "sha256-deIbpn4YM7/NeuJ5Co48ivJmxwrcsbLl6c3cP3JZxAQ="; }; }; src = fetchFromGitHub { owner = "typst"; repo = "typst"; sha256 = "sha256-kI/aZvDNbdtrvmqNt/pyeFdwef69jfuKZvAn0qZllnc="; rev = version; leaveDotGit = true; }; # the build.rs script wants a version hash from git. nativeBuildInputs = [ git rust-bin.stable.latest.minimal ]; }