1{ lib, buildPythonPackage, pythonOlder, fetchPypi, ncurses, importlib-metadata }:
2
3buildPythonPackage rec {
4 pname = "cx_Freeze";
5 version = "6.5.3";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "e0d03cabcdf9b9c21354807ed9f06fa9481a8fd5a0838968a830f01a70820ff1";
10 };
11
12 disabled = pythonOlder "3.5";
13
14 propagatedBuildInputs = [
15 importlib-metadata # upstream has this for 3.8 as well
16 ncurses
17 ];
18
19 # timestamp need to come after 1980 for zipfiles and nix store is set to epoch
20 prePatch = ''
21 substituteInPlace cx_Freeze/freezer.py --replace "os.stat(module.file).st_mtime" "time.time()"
22 '';
23
24 # fails to find Console even though it exists on python 3.x
25 doCheck = false;
26
27 meta = with lib; {
28 description = "A set of scripts and modules for freezing Python scripts into executables";
29 homepage = "http://cx-freeze.sourceforge.net/";
30 license = licenses.psfl;
31 };
32}