2018-10-17 19:27:34 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchurl
|
|
|
|
, vmprof
|
|
|
|
, pyqt4
|
|
|
|
, isPyPy
|
|
|
|
, pkgs
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
# scons is needed but using it requires Python 2.7
|
|
|
|
# Therefore we create a separate env for it.
|
|
|
|
scons = pkgs.python27.withPackages(ps: [ pkgs.scons ]);
|
|
|
|
in buildPythonPackage rec {
|
2020-07-06 16:36:08 +01:00
|
|
|
version = "0.6.8.4";
|
2018-10-17 19:27:34 +01:00
|
|
|
pname = "Nuitka";
|
|
|
|
|
|
|
|
# Latest version is not yet on PyPi
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/kayhayen/Nuitka/archive/${version}.tar.gz";
|
2020-07-06 16:36:08 +01:00
|
|
|
sha256 = "0awhwksnmqmbciimqmd11wygp7bnq57khcg4n9r4ld53s147rmqm";
|
2018-10-17 19:27:34 +01:00
|
|
|
};
|
|
|
|
|
2018-11-12 02:52:07 +00:00
|
|
|
checkInputs = [ vmprof pyqt4 ];
|
|
|
|
nativeBuildInputs = [ scons ];
|
2018-10-17 19:27:34 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tests/run-tests
|
|
|
|
'' + stdenv.lib.optionalString stdenv.isLinux ''
|
|
|
|
substituteInPlace nuitka/plugins/standard/ImplicitImports.py --replace 'locateDLL("uuid")' '"${pkgs.utillinux.out}/lib/libuuid.so"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
# We do not want any wrappers here.
|
|
|
|
postFixup = '''';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
tests/run-tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Problem with a subprocess (parts)
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# Requires CPython
|
|
|
|
disabled = isPyPy;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Python compiler with full language support and CPython compatibility";
|
|
|
|
license = licenses.asl20;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://nuitka.net/";
|
2018-10-17 19:27:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|