From 7a9fe3580927ba74d5b5a5b827e33ec8f4406414 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 21 Jan 2023 18:36:48 +0100 Subject: [PATCH] python311Packages.bunch: use fork --- .../python-modules/bunch/default.nix | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/bunch/default.nix b/pkgs/development/python-modules/bunch/default.nix index 2758ff5b4185..39c858ebb676 100644 --- a/pkgs/development/python-modules/bunch/default.nix +++ b/pkgs/development/python-modules/bunch/default.nix @@ -1,17 +1,40 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +}: buildPythonPackage rec { pname = "bunch"; - version = "1.0.1"; + version = "unstable-2017-11-21"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "1akalx2pd1fjlvrq69plvcx783ppslvikqdm93z2sdybq07pmish"; + disabled = pythonOlder "3.7"; + + # Use a fork as upstream is dead + src = fetchFromGitHub { + owner = "olivecoder"; + repo = pname; + rev = "71ac9d5c712becd4c502ab3099203731a0f1122e"; + hash = "sha256-XOgzJkcIqkAJFsKAyt2jSEIxcc0h2gFC15xy5kAs+7s="; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "rU" "r" + ''; + + # No real tests available doCheck = false; + pythonImportsCheck = [ + "bunch" + ]; + meta = with lib; { + description = "Python dictionary that provides attribute-style access"; + homepage = "https://github.com/dsc/bunch"; + license = licenses.mit; maintainers = with maintainers; [ ]; }; }