From 35fc42abe1be1ecc2540b0a2d8bfb6cfd1f64412 Mon Sep 17 00:00:00 2001 From: Tom Hunze Date: Sun, 22 Mar 2026 11:18:22 +0100 Subject: [PATCH 1/4] python3Packages.filebytes: fix build with python 3.14 Upstream PR: https://github.com/sashs/filebytes/pull/36 --- pkgs/development/python-modules/filebytes/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/filebytes/default.nix b/pkgs/development/python-modules/filebytes/default.nix index 332ec50596b7..2a7a73578ae0 100644 --- a/pkgs/development/python-modules/filebytes/default.nix +++ b/pkgs/development/python-modules/filebytes/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchPypi, + fetchpatch, }: buildPythonPackage rec { @@ -14,6 +15,15 @@ buildPythonPackage rec { sha256 = "0h97i6h525hg401dvvaa5krxi184qpvldbdn0izmirvr9pvh4hkn"; }; + patches = [ + # Upstream PR: https://github.com/sashs/filebytes/pull/36 + (fetchpatch { + name = "python-3.14.patch"; + url = "https://github.com/sashs/filebytes/commit/469058d50d4b7ff8da54b623a0a1aa972cd78dc6.patch"; + hash = "sha256-VizYOqyJ3xpJIU4KKsYcz2DCurlfrWTgdsn84FVWD6w="; + }) + ]; + meta = { homepage = "https://scoding.de/filebytes-introduction"; license = lib.licenses.gpl2; From fc1206e1f7612e05f31583f264126602a69a0875 Mon Sep 17 00:00:00 2001 From: Tom Hunze Date: Sun, 22 Mar 2026 11:20:41 +0100 Subject: [PATCH 2/4] python3Packages.filebytes: fetch `src` from GitHub --- pkgs/development/python-modules/filebytes/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/filebytes/default.nix b/pkgs/development/python-modules/filebytes/default.nix index 2a7a73578ae0..7cc04c3f03cd 100644 --- a/pkgs/development/python-modules/filebytes/default.nix +++ b/pkgs/development/python-modules/filebytes/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, fetchpatch, }: @@ -10,9 +10,11 @@ buildPythonPackage rec { version = "0.10.2"; format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "0h97i6h525hg401dvvaa5krxi184qpvldbdn0izmirvr9pvh4hkn"; + src = fetchFromGitHub { + owner = "sashs"; + repo = "filebytes"; + tag = "v${version}"; + hash = "sha256-8DGVCqWnEiqLCKWAYWrAjr50ZB6SMPMH+VqMqpALnVo="; }; patches = [ From 468b4dc4f9ec0b8231880b3a5a78f3308f133f16 Mon Sep 17 00:00:00 2001 From: Tom Hunze Date: Sun, 22 Mar 2026 11:21:32 +0100 Subject: [PATCH 3/4] python3Packages.filebytes: fix `meta.license` https://github.com/sashs/filebytes/blob/v0.10.2/COPYING --- pkgs/development/python-modules/filebytes/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/filebytes/default.nix b/pkgs/development/python-modules/filebytes/default.nix index 7cc04c3f03cd..92866eedeaf2 100644 --- a/pkgs/development/python-modules/filebytes/default.nix +++ b/pkgs/development/python-modules/filebytes/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { meta = { homepage = "https://scoding.de/filebytes-introduction"; - license = lib.licenses.gpl2; + license = lib.licenses.bsd3; description = "Scripts to parse ELF, PE, Mach-O and OAT (Android Runtime)"; maintainers = with lib.maintainers; [ bennofs ]; }; From f52df0ff93097dd82fc91e6919c58ab82ed47b4d Mon Sep 17 00:00:00 2001 From: Tom Hunze Date: Sun, 22 Mar 2026 11:22:35 +0100 Subject: [PATCH 4/4] python3Packages.filebytes: modernize --- pkgs/development/python-modules/filebytes/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/filebytes/default.nix b/pkgs/development/python-modules/filebytes/default.nix index 92866eedeaf2..533bede02047 100644 --- a/pkgs/development/python-modules/filebytes/default.nix +++ b/pkgs/development/python-modules/filebytes/default.nix @@ -3,17 +3,18 @@ buildPythonPackage, fetchFromGitHub, fetchpatch, + setuptools, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "filebytes"; version = "0.10.2"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "sashs"; repo = "filebytes"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-8DGVCqWnEiqLCKWAYWrAjr50ZB6SMPMH+VqMqpALnVo="; }; @@ -26,10 +27,12 @@ buildPythonPackage rec { }) ]; + build-system = [ setuptools ]; + meta = { homepage = "https://scoding.de/filebytes-introduction"; license = lib.licenses.bsd3; description = "Scripts to parse ELF, PE, Mach-O and OAT (Android Runtime)"; maintainers = with lib.maintainers; [ bennofs ]; }; -} +})