1{ stdenv
2, buildPythonPackage
3, fetchurl
4, vmprof
5, pyqt4
6, isPyPy
7, pkgs
8}:
9
10let
11 # scons is needed but using it requires Python 2.7
12 # Therefore we create a separate env for it.
13 scons = pkgs.python27.withPackages(ps: [ pkgs.scons ]);
14in buildPythonPackage rec {
15 version = "0.6.7";
16 pname = "Nuitka";
17
18 # Latest version is not yet on PyPi
19 src = fetchurl {
20 url = "https://github.com/kayhayen/Nuitka/archive/${version}.tar.gz";
21 sha256 = "09mrm7iz2wdrd7y2csbcidg6bkskjignx2pnifh4i8zlh0vm61bg";
22 };
23
24 checkInputs = [ vmprof pyqt4 ];
25 nativeBuildInputs = [ scons ];
26
27 postPatch = ''
28 patchShebangs tests/run-tests
29 '' + stdenv.lib.optionalString stdenv.isLinux ''
30 substituteInPlace nuitka/plugins/standard/ImplicitImports.py --replace 'locateDLL("uuid")' '"${pkgs.utillinux.out}/lib/libuuid.so"'
31 '';
32
33 # We do not want any wrappers here.
34 postFixup = '''';
35
36 checkPhase = ''
37 tests/run-tests
38 '';
39
40 # Problem with a subprocess (parts)
41 doCheck = false;
42
43 # Requires CPython
44 disabled = isPyPy;
45
46 meta = with stdenv.lib; {
47 description = "Python compiler with full language support and CPython compatibility";
48 license = licenses.asl20;
49 homepage = https://nuitka.net/;
50 };
51
52}