python3Packages.diceware: fix test failure with python 3.14

Backport upstream fix that sets `prog` explicitly in `ArgumentParser`,
since Python 3.14 changed how the default prog name is derived and
monkeypatching `sys.argv` no longer affects it.
This commit is contained in:
Lorenzo Manacorda
2026-04-04 19:57:59 +02:00
parent ef788cd1c1
commit 5d16738662
@@ -4,6 +4,7 @@
fetchPypi,
setuptools,
pytestCheckHook,
fetchpatch2,
}:
buildPythonPackage rec {
@@ -16,6 +17,20 @@ buildPythonPackage rec {
hash = "sha256-VLaQgJ8MVqswhaGOFaDDgE1KDRJ/OK7wtc9fhZ0PZjk=";
};
patches = [
(fetchpatch2 {
# Set prog in ArgumentParser explicitly to fix test failure with Python 3.14
# https://github.com/ulif/diceware/issues/122
url = "https://github.com/ulif/diceware/commit/77d98606748df7755f36ebbb3bd838b1cdd80c61.patch";
includes = [ "diceware/__init__.py" ];
hunks = [
2
3
];
hash = "sha256-yXGotV/tq7/vCYhY+1OZgCW3r6/SXTTvsHIU/jywbHc=";
})
];
build-system = [ setuptools ];
dependencies = [ setuptools ];