opshin: 0.24.1 -> 0.24.2 (#402433)

This commit is contained in:
Peder Bergebakken Sundt
2025-05-31 22:41:08 +02:00
committed by GitHub
6 changed files with 51 additions and 16 deletions
+15 -9
View File
@@ -4,9 +4,20 @@
python3,
}:
python3.pkgs.buildPythonApplication rec {
let
python3' = python3.override {
self = python3;
packageOverrides = (
final: prev: {
cbor2 = prev.cbor2WithoutCExtensions;
}
);
};
in
python3'.pkgs.buildPythonApplication rec {
pname = "opshin";
version = "0.24.1";
version = "0.24.2";
format = "pyproject";
@@ -14,10 +25,10 @@ python3.pkgs.buildPythonApplication rec {
owner = "OpShin";
repo = "opshin";
tag = version;
hash = "sha256-+uuTEszA5p/qhvthM3Uje6yX3urbIUAKKfDZ4JXEYYQ=";
hash = "sha256-L0vWEXlghXssT9oUw5AYG3/4ALoB/NH90JV8Kdl2n30=";
};
propagatedBuildInputs = with python3.pkgs; [
propagatedBuildInputs = with python3'.pkgs; [
setuptools
poetry-core
uplc
@@ -28,11 +39,6 @@ python3.pkgs.buildPythonApplication rec {
ordered-set
];
pythonRelaxDeps = [
"pluthon"
"uplc"
];
meta = with lib; {
description = "Simple pythonic programming language for Smart Contracts on Cardano";
homepage = "https://opshin.dev";
@@ -4,6 +4,8 @@
fetchPypi,
pythonOlder,
withCExtensions ? true,
# build-system
setuptools,
setuptools-scm,
@@ -39,6 +41,14 @@ buildPythonPackage rec {
pytestCheckHook
];
env = lib.optionalAttrs (!withCExtensions) {
CBOR2_BUILD_C_EXTENSION = "0";
};
passthru = {
inherit withCExtensions;
};
meta = with lib; {
changelog = "https://github.com/agronholm/cbor2/releases/tag/${version}";
description = "Python CBOR (de)serializer with extensive tag support";
@@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "pluthon";
version = "1.0.0";
version = "1.1.0";
format = "pyproject";
@@ -20,7 +20,7 @@ buildPythonPackage rec {
owner = "OpShin";
repo = "pluthon";
rev = version;
hash = "sha256-IYpkb/RXRu53HoeVKik7Jog5FyXwrWItrxSla9dN0s4=";
hash = "sha256-t8KWm2eBq6CzFPAWN9pgbpF62hvNNZWCpphJsY5T2OQ=";
};
propagatedBuildInputs = [
@@ -25,7 +25,7 @@
}:
let
cose_0_9_dev8 = cose.overridePythonAttrs (old: rec {
cose_0_9_dev8 = (cose.override { inherit cbor2; }).overridePythonAttrs (old: rec {
version = "0.9.dev8";
src = (
old.src.override {
@@ -38,14 +38,14 @@ let
in
buildPythonPackage rec {
pname = "pycardano";
version = "0.12.3";
version = "0.14.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Python-Cardano";
repo = "pycardano";
tag = "v${version}";
hash = "sha256-jxgskdQ7Us+utndUgFYK7G2IW/e5QbeXytOsxQfFiJI=";
hash = "sha256-W5N254tND7mI0oR82YhMFWn4zVVs3ygYOqXOBMO3sXY=";
};
build-system = [
@@ -88,5 +88,9 @@ buildPythonPackage rec {
homepage = "https://github.com/Python-Cardano/pycardano";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ t4ccer ];
# https://github.com/Python-Cardano/pycardano/blob/v0.13.2/Makefile#L26-L39
# cbor2 with C extensions fail tests due to differences in used sized vs unsized arrays
# more info: https://github.com/NixOS/nixpkgs/pull/402433#issuecomment-2916520286
broken = cbor2.withCExtensions; # consider overriding cbor2 with cbor2WithoutCExtensions
};
}
@@ -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";
+4
View File
@@ -2300,6 +2300,10 @@ self: super: with self; {
cbor2 = callPackage ../development/python-modules/cbor2 { };
cbor2WithoutCExtensions = callPackage ../development/python-modules/cbor2 {
withCExtensions = false;
};
cccolutils = callPackage ../development/python-modules/cccolutils { krb5-c = pkgs.krb5; };
cdcs = callPackage ../development/python-modules/cdcs { };