Skip to content

Commit

Permalink
python312Packages.typst: init at 0.12.2 (NixOS#373561)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabaff authored Jan 15, 2025
2 parents 29c275e + 9f8a8df commit 70bcbc1
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
60 changes: 60 additions & 0 deletions pkgs/development/python-modules/typst/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
lib,
stdenv,

Check failure on line 3 in pkgs/development/python-modules/typst/default.nix

View workflow job for this annotation

GitHub Actions / exp-nixf-tidy-check

sema-unused-def-lambda-noarg-formal

attribute `stdenv` of argument is not used
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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17428,6 +17428,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 { };
Expand Down

0 comments on commit 70bcbc1

Please sign in to comment.