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