From 6db453b3c678bbcd939c994cc31d326bd443c400 Mon Sep 17 00:00:00 2001 From: figsoda Date: Thu, 18 May 2023 22:52:39 -0400 Subject: [PATCH] python310Packages.purepng: fix build --- .../python-modules/purepng/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/purepng/default.nix b/pkgs/development/python-modules/purepng/default.nix index 29a3a2aba57..156f5d4bc22 100644 --- a/pkgs/development/python-modules/purepng/default.nix +++ b/pkgs/development/python-modules/purepng/default.nix @@ -32,17 +32,26 @@ buildPythonPackage { # numpy is optional - if not supplied, tests simply have less coverage nativeCheckInputs = [ numpy ]; + + postPatch = '' + substituteInPlace code/test_png.py \ + --replace numpy.bool bool + ''; + # checkPhase begins by deleting source dir to force test execution against installed version checkPhase = '' + runHook preCheck + rm -r code/png ${python.interpreter} code/test_png.py + + runHook postCheck ''; meta = with lib; { description = "Pure Python library for PNG image encoding/decoding"; - homepage = "https://github.com/scondo/purepng"; - license = licenses.mit; + homepage = "https://github.com/scondo/purepng"; + license = licenses.mit; maintainers = with maintainers; [ ris ]; }; - }