From 2b47cedec6e807e0906f60cf685840f066fb94cd Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 17 May 2023 13:32:53 -0400 Subject: [PATCH] python310Packages.cx_Freeze: fix build --- .../python-modules/cx_freeze/default.nix | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/cx_freeze/default.nix b/pkgs/development/python-modules/cx_freeze/default.nix index bee15a5e38d1..0681b727b220 100644 --- a/pkgs/development/python-modules/cx_freeze/default.nix +++ b/pkgs/development/python-modules/cx_freeze/default.nix @@ -1,4 +1,12 @@ -{ stdenv, lib, buildPythonPackage, pythonOlder, fetchPypi, ncurses, importlib-metadata }: +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, ncurses +, importlib-metadata +, setuptools +, patchelf +}: buildPythonPackage rec { pname = "cx-freeze"; @@ -15,23 +23,33 @@ buildPythonPackage rec { propagatedBuildInputs = [ importlib-metadata # upstream has this for 3.8 as well ncurses + setuptools ]; - # timestamp need to come after 1980 for zipfiles and nix store is set to epoch postPatch = '' - substituteInPlace cx_Freeze/freezer.py --replace "os.stat(module.file).st_mtime" "time.time()" + # timestamp need to come after 1980 for zipfiles and nix store is set to epoch + substituteInPlace cx_Freeze/freezer.py --replace "st.st_mtime" "time.time()" - substituteInPlace setup.cfg \ - --replace "setuptools>=59.0.1,<=60.10.0" "setuptools>=59.0.1" + sed -i /patchelf/d pyproject.toml + substituteInPlace pyproject.toml \ + --replace 'setuptools>=61.2,<67' setuptools ''; + makeWrapperArgs = [ + "--prefix" + "PATH" + ":" + (lib.makeBinPath [ patchelf ]) + ]; + # fails to find Console even though it exists on python 3.x doCheck = false; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); description = "A set of scripts and modules for freezing Python scripts into executables"; homepage = "https://marcelotduarte.github.io/cx_Freeze/"; license = licenses.psfl; + maintainers = with maintainers; [ ]; + mainProgram = "cxfreeze"; }; }