1{
2 lib,
3 buildPythonPackage,
4 distutils,
5 fetchPypi,
6 pythonOlder,
7 ncurses,
8 packaging,
9 setuptools,
10 filelock,
11 wheel,
12 patchelf,
13}:
14
15buildPythonPackage rec {
16 pname = "cx-freeze";
17 version = "7.2.2";
18 pyproject = true;
19
20 disabled = pythonOlder "3.11";
21
22 src = fetchPypi {
23 pname = "cx_freeze";
24 inherit version;
25 hash = "sha256-6bLEvWjr9PuZtq8v8oHA5TewSa7pSIBcxKAo4XGKvGo=";
26 };
27
28 postPatch = ''
29 sed -i /patchelf/d pyproject.toml
30 # Build system requirements
31 substituteInPlace pyproject.toml \
32 --replace-fail "setuptools>=70.1,<75" "setuptools"
33 '';
34
35 build-system = [
36 setuptools
37 wheel
38 ];
39
40 buildInputs = [ ncurses ];
41
42 dependencies = [
43 distutils
44 filelock
45 packaging
46 setuptools
47 wheel
48 ];
49
50 makeWrapperArgs = [
51 "--prefix"
52 "PATH"
53 ":"
54 (lib.makeBinPath [ patchelf ])
55 ];
56
57 # Fails to find Console even though it exists on python 3.x
58 doCheck = false;
59
60 meta = with lib; {
61 description = "Set of scripts and modules for freezing Python scripts into executables";
62 homepage = "https://marcelotduarte.github.io/cx_Freeze/";
63 changelog = "https://github.com/marcelotduarte/cx_Freeze/releases/tag/${version}";
64 license = licenses.psfl;
65 maintainers = [ ];
66 mainProgram = "cxfreeze";
67 };
68}