1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, ncurses 6, importlib-metadata 7, setuptools 8, wheel 9, patchelf 10}: 11 12buildPythonPackage rec { 13 pname = "cx-freeze"; 14 version = "6.15.10"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchPypi { 20 pname = "cx_Freeze"; 21 inherit version; 22 hash = "sha256-Bc0md1lpL1EYYdIoYNNeKgW/v3OPliwVdhi7jHcdIyA="; 23 }; 24 25 nativeBuildInputs = [ 26 setuptools 27 wheel 28 ]; 29 30 propagatedBuildInputs = [ 31 importlib-metadata # upstream has this for 3.8 as well 32 ncurses 33 setuptools 34 ]; 35 36 postPatch = '' 37 # timestamp need to come after 1980 for zipfiles and nix store is set to epoch 38 substituteInPlace cx_Freeze/freezer.py --replace "st.st_mtime" "time.time()" 39 40 sed -i /patchelf/d pyproject.toml 41 substituteInPlace pyproject.toml \ 42 --replace 'setuptools>=61.2,<67' setuptools 43 ''; 44 45 makeWrapperArgs = [ 46 "--prefix" 47 "PATH" 48 ":" 49 (lib.makeBinPath [ patchelf ]) 50 ]; 51 52 # fails to find Console even though it exists on python 3.x 53 doCheck = false; 54 55 meta = with lib; { 56 description = "A set of scripts and modules for freezing Python scripts into executables"; 57 homepage = "https://marcelotduarte.github.io/cx_Freeze/"; 58 changelog = "https://github.com/marcelotduarte/cx_Freeze/releases/tag/${version}"; 59 license = licenses.psfl; 60 maintainers = with maintainers; [ ]; 61 mainProgram = "cxfreeze"; 62 }; 63}