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";