python312Packages.typst: init at 0.12.2
Python binding to typst https://github.com/messense/typst-py
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
cargo,
|
||||
fetchFromGitHub,
|
||||
openssl,
|
||||
pkg-config,
|
||||
pythonOlder,
|
||||
rustc,
|
||||
rustPlatform,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "typst";
|
||||
version = "0.12.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "messense";
|
||||
repo = "typst-py";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-vK55LoEc5BaS2tQwuLhXDnv8xiSOgk/ngU/gtbhZR2k=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-01kSin3da58rPTHRmjyj62nf6HshmD6ARbhUd3eBfV0=";
|
||||
};
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
@@ -17412,6 +17412,8 @@ self: super: with self; {
|
||||
|
||||
typogrify = callPackage ../development/python-modules/typogrify { };
|
||||
|
||||
typst = callPackage ../development/python-modules/typst { };
|
||||
|
||||
tzdata = callPackage ../development/python-modules/tzdata { };
|
||||
|
||||
tzlocal = callPackage ../development/python-modules/tzlocal { };
|
||||
|
||||
Reference in New Issue
Block a user