From c0ff075e471e9b7e564017ff31f11ecd1662da04 Mon Sep 17 00:00:00 2001 From: t4ccer Date: Sun, 27 Apr 2025 22:56:14 -0600 Subject: [PATCH] python3Packages.uplc: 1.0.7 -> 1.0.10 --- pkgs/development/python-modules/uplc/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/uplc/default.nix b/pkgs/development/python-modules/uplc/default.nix index dd8e8cbea634..e9a2874b17c0 100644 --- a/pkgs/development/python-modules/uplc/default.nix +++ b/pkgs/development/python-modules/uplc/default.nix @@ -8,14 +8,16 @@ setuptools, poetry-core, frozendict, + cbor2WithoutCExtensions, cbor2, rply, pycardano, + uplc, }: buildPythonPackage rec { pname = "uplc"; - version = "1.0.7"; + version = "1.0.10"; format = "pyproject"; @@ -23,7 +25,7 @@ buildPythonPackage rec { owner = "OpShin"; repo = "uplc"; tag = version; - hash = "sha256-xK2k0XLybWqyP5Qa2Oby8YBgiiswR++yVK7NPgpdSa0="; + hash = "sha256-Owo4W4jChrdYnz11BbWQdm2SiwFwOJlqjYutuRyjpxs="; }; propagatedBuildInputs = [ @@ -37,8 +39,17 @@ buildPythonPackage rec { python-secp256k1-cardano ]; + # Support cbor2 without C extensions + postPatch = lib.optionalString (!cbor2.withCExtensions) '' + substituteInPlace uplc/ast.py --replace-fail 'from _cbor2' 'from cbor2' + ''; + pythonImportsCheck = [ "uplc" ]; + passthru.tests.withoutCExtensions = uplc.override { + cbor2 = cbor2WithoutCExtensions; + }; + meta = with lib; { description = "Python implementation of untyped plutus language core"; homepage = "https://github.com/OpShin/uplc";