1{ lib, buildPythonPackage, pythonOlder, fetchPypi, ncurses, importlib-metadata }:
2
3buildPythonPackage rec {
4 pname = "cx_Freeze";
5 version = "6.8.1";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "3f16d3d40f7f2e1f6032132170d8fd4ba2f4f9ea419f13d7a68091bbe1949583";
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}