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