From 4ff5bde55c65f498892d201dfed75f01351d0697 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 12 Mar 2026 12:48:02 +0100 Subject: [PATCH 1/4] python3Packages.ebcdic: 1.1.1 -> 2.0.0 --- .../python-modules/ebcdic/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/ebcdic/default.nix b/pkgs/development/python-modules/ebcdic/default.nix index 2c925eedd853..40aa8512dce9 100644 --- a/pkgs/development/python-modules/ebcdic/default.nix +++ b/pkgs/development/python-modules/ebcdic/default.nix @@ -2,25 +2,25 @@ lib, buildPythonPackage, fetchFromGitHub, - setuptools, + flit-core, pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "ebcdic"; - version = "1.1.1"; + version = "2.0.0"; pyproject = true; src = fetchFromGitHub { owner = "roskakori"; repo = "CodecMapper"; - tag = "v${version}"; - hash = "sha256-gRyZychcF3wYocgVbdF255cSuZh/cl8X0WH/Iplkmxc="; + tag = "v${finalAttrs.version}"; + hash = "sha256-71EMWUGoJrsc3EOVHeV4xqSJRKoA7Sz2dvmZJ1sjQCg="; }; - sourceRoot = "${src.name}/${pname}"; + sourceRoot = "${finalAttrs.src.name}/${finalAttrs.pname}"; - nativeBuildInputs = [ setuptools ]; + build-system = [ flit-core ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -40,4 +40,4 @@ buildPythonPackage rec { license = lib.licenses.bsd2; maintainers = with lib.maintainers; [ fab ]; }; -} +}) From 3f9466994ec1379cc8f613bf0df0191bf6a43ad2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 9 Apr 2026 18:01:48 +0200 Subject: [PATCH 2/4] python3Packages.oletools: disable failing tests --- pkgs/development/python-modules/oletools/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/oletools/default.nix b/pkgs/development/python-modules/oletools/default.nix index 2ccd85b43e80..bc197109e83a 100644 --- a/pkgs/development/python-modules/oletools/default.nix +++ b/pkgs/development/python-modules/oletools/default.nix @@ -43,6 +43,10 @@ buildPythonPackage rec { # Test fails with AssertionError: Tuples differ: ('MS Word 2007+... "test_all" "test_xlm" + # AssertionError: Found "warn" in output... + "test_empty_behaviour" + "test_rtf_behaviour" + "test_text_behaviour" ]; pythonImportsCheck = [ "oletools" ]; From e82e9bd8a33da6facd6d2368274ee40e393173e5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 9 Apr 2026 18:05:39 +0200 Subject: [PATCH 3/4] python3Packages.oletools: modernize --- .../python-modules/oletools/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/oletools/default.nix b/pkgs/development/python-modules/oletools/default.nix index bc197109e83a..2d10dfe9509a 100644 --- a/pkgs/development/python-modules/oletools/default.nix +++ b/pkgs/development/python-modules/oletools/default.nix @@ -7,11 +7,12 @@ msoffcrypto-tool, olefile, pcodedmp, + setuptools, pyparsing, pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "oletools"; version = "0.60.2"; format = "setuptools"; @@ -19,11 +20,15 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "decalage2"; repo = "oletools"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-ons1VeWStxUZw2CPpnX9p5I3Q7cMhi34JU8TeuUDt+Y="; }; - propagatedBuildInputs = [ + pythonRelaxDeps = [ "pyparsing" ]; + + build-system = [ setuptools ]; + + dependencies = [ colorclass easygui msoffcrypto-tool @@ -34,11 +39,6 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "pyparsing>=2.1.0,<3" "pyparsing>=2.1.0" - ''; - disabledTests = [ # Test fails with AssertionError: Tuples differ: ('MS Word 2007+... "test_all" @@ -54,10 +54,11 @@ buildPythonPackage rec { meta = { description = "Module to analyze MS OLE2 files and MS Office documents"; homepage = "https://github.com/decalage2/oletools"; + changelog = "https://github.com/decalage2/oletools/releases/tag/${finalAttrs.src.tag}"; license = with lib.licenses; [ bsd2 # and mit ]; maintainers = with lib.maintainers; [ fab ]; }; -} +}) From bb92560436e16d508499c8e2b43e574c9b4b8116 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 9 Apr 2026 19:06:46 +0200 Subject: [PATCH 4/4] python3Packages.extract-msg: relax ebcdic --- pkgs/development/python-modules/extract-msg/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/extract-msg/default.nix b/pkgs/development/python-modules/extract-msg/default.nix index 633218c3621b..d0cd36b0d317 100644 --- a/pkgs/development/python-modules/extract-msg/default.nix +++ b/pkgs/development/python-modules/extract-msg/default.nix @@ -31,13 +31,13 @@ buildPythonPackage (finalAttrs: { hash = "sha256-n/v3ubgzWlWqLXZfy1O7+FvTJoLMtgL7DFPL39SZnfM="; }; - build-system = [ - setuptools - ]; - pythonRelaxDeps = [ "beautifulsoup4" + "ebcdic" ]; + + build-system = [ setuptools ]; + dependencies = [ beautifulsoup4 compressed-rtf