From 0f84cc8b19f630dc717a8cfa0603611ae53c0169 Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Thu, 1 May 2025 21:59:01 +0200 Subject: [PATCH 1/2] python31{2,3,4}Packages.sjcl: fix build sjcl was never running any unit tests in nixpkgs anyways[1], and python 3.12 seems to have introduced an error when no unit test is being run. [1]: https://hydra.nixos.org/build/176216230/log/tail --- pkgs/development/python-modules/sjcl/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/python-modules/sjcl/default.nix b/pkgs/development/python-modules/sjcl/default.nix index ba519e78e952..780f0bed6cfd 100644 --- a/pkgs/development/python-modules/sjcl/default.nix +++ b/pkgs/development/python-modules/sjcl/default.nix @@ -3,7 +3,6 @@ buildPythonPackage, fetchFromGitHub, pycryptodome, - unittestCheckHook, }: buildPythonPackage rec { @@ -23,8 +22,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ pycryptodome ]; - nativeCheckInputs = [ unittestCheckHook ]; - pythonImportsCheck = [ "sjcl" ]; meta = with lib; { From 10007549813a59ca81a9ecd53db12699c24a2f25 Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Thu, 1 May 2025 22:01:06 +0200 Subject: [PATCH 2/2] python3Packages.sjcl: modernize --- .../python-modules/sjcl/default.nix | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/sjcl/default.nix b/pkgs/development/python-modules/sjcl/default.nix index 780f0bed6cfd..e9d8a32b1761 100644 --- a/pkgs/development/python-modules/sjcl/default.nix +++ b/pkgs/development/python-modules/sjcl/default.nix @@ -2,32 +2,34 @@ lib, buildPythonPackage, fetchFromGitHub, + setuptools, pycryptodome, }: -buildPythonPackage rec { +buildPythonPackage { pname = "sjcl"; version = "0.2.1"; - - format = "setuptools"; + pyproject = true; # PyPi release is missing tests src = fetchFromGitHub { owner = "berlincode"; - repo = pname; + repo = "sjcl"; # commit from: 2018-08-16, because there aren't any tags on git rev = "e8bdad312fa99c89c74f8651a1240afba8a9f3bd"; - sha256 = "1v8rc55v28v8cl7nxcavj34am005wi63zcvwnbc6pyfbv4ss30ab"; + hash = "sha256-S4GhNdnL+WvYsnyzP0zkBYCqyJBbsW4PZWgjsUthGe0="; }; - propagatedBuildInputs = [ pycryptodome ]; + build-system = [ setuptools ]; + + dependencies = [ pycryptodome ]; pythonImportsCheck = [ "sjcl" ]; - meta = with lib; { - description = "Decrypt and encrypt messages compatible to the \"Stanford Javascript Crypto Library (SJCL)\" message format. This is a wrapper around pycrypto"; + meta = { + description = "Decrypt and encrypt messages compatible to the \"Stanford Javascript Crypto Library (SJCL)\" message format"; homepage = "https://github.com/berlincode/sjcl"; - license = licenses.bsd3; - maintainers = with maintainers; [ binsky ]; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ binsky ]; }; }