2025-01-15 11:57:15 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
cargo,
|
|
|
|
fetchFromGitHub,
|
|
|
|
openssl,
|
|
|
|
pkg-config,
|
|
|
|
pythonOlder,
|
|
|
|
rustc,
|
|
|
|
rustPlatform,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "typst";
|
2025-03-21 13:42:39 +01:00
|
|
|
version = "0.13.2";
|
2025-01-15 11:57:15 +01:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "messense";
|
|
|
|
repo = "typst-py";
|
|
|
|
tag = "v${version}";
|
2025-03-21 13:42:39 +01:00
|
|
|
hash = "sha256-Cqi8GupcC7n/OfiFLrNXw0ydXpOqOpWTgIGJXdib5L8=";
|
2025-01-15 11:57:15 +01:00
|
|
|
};
|
|
|
|
|
2025-01-26 15:48:05 +01:00
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
2025-05-30 04:18:04 +02:00
|
|
|
inherit pname version src;
|
2025-03-21 13:42:39 +01:00
|
|
|
hash = "sha256-bcO+irLT4Sy8IZ/YQZFD2jVjZAUCO0j+TitigHo4xbM=";
|
2025-01-15 11:57:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
build-system = [
|
|
|
|
cargo
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
rustPlatform.maturinBuildHook
|
|
|
|
rustc
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "typst" ];
|
|
|
|
|
|
|
|
env = {
|
|
|
|
OPENSSL_NO_VENDOR = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Module has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Python binding to typst";
|
|
|
|
homepage = "https://github.com/messense/typst-py";
|
|
|
|
changelog = "https://github.com/messense/typst-py/releases/tag/v${version}";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|