2024-10-30 22:24:29 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
fetchCrate,
|
|
|
|
stdenv,
|
|
|
|
darwin,
|
|
|
|
makeWrapper,
|
|
|
|
typst,
|
2023-06-07 23:25:35 +00:00
|
|
|
}:
|
|
|
|
|
2023-09-01 20:37:33 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2023-06-07 23:25:35 +00:00
|
|
|
pname = "typst-live";
|
2024-10-30 22:24:07 +00:00
|
|
|
version = "0.8.0";
|
2023-06-07 23:25:35 +00:00
|
|
|
|
2023-09-01 20:37:33 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2024-10-30 22:24:07 +00:00
|
|
|
hash = "sha256-bR4Rhhs6rAC6C1nfPFj/3rCtfEziuTGn5m33CR0qZkU=";
|
2023-06-07 23:25:35 +00:00
|
|
|
};
|
|
|
|
|
2024-10-30 22:24:07 +00:00
|
|
|
cargoHash = "sha256-jUtlJ5LPEy/4BX2G5z/UbOYM5nPNH/hTC7MiMrqYWRI=";
|
2023-06-07 23:25:35 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.CoreServices
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/typst-live \
|
|
|
|
--suffix PATH : ${lib.makeBinPath [ typst ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Hot reloading for your typst files";
|
|
|
|
homepage = "https://github.com/ItsEthra/typst-live";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
2023-09-01 20:37:33 +00:00
|
|
|
mainProgram = "typst-live";
|
2023-06-07 23:25:35 +00:00
|
|
|
};
|
|
|
|
}
|