Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at r-updates 59 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 cargo, 6 fetchFromGitHub, 7 openssl, 8 pkg-config, 9 pythonOlder, 10 rustc, 11 rustPlatform, 12}: 13 14buildPythonPackage rec { 15 pname = "typst"; 16 version = "0.13.5"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "messense"; 23 repo = "typst-py"; 24 tag = "v${version}"; 25 hash = "sha256-MGO5OSUlFvYBzNm71Rs84yr4j30kKCg/pqvRdQqwk+A="; 26 }; 27 28 cargoDeps = rustPlatform.fetchCargoVendor { 29 inherit pname version src; 30 hash = "sha256-/R0iFrqWtIATtgPrw88WDD00ML8XrTFgoOABLFzgtyk="; 31 }; 32 33 build-system = [ 34 cargo 35 pkg-config 36 rustPlatform.cargoSetupHook 37 rustPlatform.maturinBuildHook 38 rustc 39 ]; 40 41 buildInputs = [ openssl ]; 42 43 pythonImportsCheck = [ "typst" ]; 44 45 env = { 46 OPENSSL_NO_VENDOR = true; 47 }; 48 49 # Module has no tests 50 doCheck = false; 51 52 meta = { 53 description = "Python binding to typst"; 54 homepage = "https://github.com/messense/typst-py"; 55 changelog = "https://github.com/messense/typst-py/releases/tag/v${version}"; 56 license = lib.licenses.asl20; 57 maintainers = with lib.maintainers; [ fab ]; 58 }; 59}