mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
59 lines
1.1 KiB
Nix
59 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
cargo,
|
|
fetchFromGitHub,
|
|
openssl,
|
|
pkg-config,
|
|
pythonOlder,
|
|
rustc,
|
|
rustPlatform,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "typst";
|
|
version = "0.13.2";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "messense";
|
|
repo = "typst-py";
|
|
tag = "v${version}";
|
|
hash = "sha256-Cqi8GupcC7n/OfiFLrNXw0ydXpOqOpWTgIGJXdib5L8=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit pname version src;
|
|
hash = "sha256-bcO+irLT4Sy8IZ/YQZFD2jVjZAUCO0j+TitigHo4xbM=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|