pythonPackages.nuitka: refactor move to python-modules
This commit is contained in:
parent
1a267e65f7
commit
5934b25cb0
2 changed files with 55 additions and 43 deletions
54
pkgs/development/python-modules/nuitka/default.nix
Normal file
54
pkgs/development/python-modules/nuitka/default.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchurl
|
||||
, vmprof
|
||||
, pyqt4
|
||||
, scons
|
||||
, 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 {
|
||||
version = "0.5.25";
|
||||
pname = "Nuitka";
|
||||
|
||||
# Latest version is not yet on PyPi
|
||||
src = fetchurl {
|
||||
url = "https://github.com/kayhayen/Nuitka/archive/${version}.tar.gz";
|
||||
sha256 = "11psz0pyj56adv4b3f47hl8jakvp2mc2c85s092a5rsv1la1a0aa";
|
||||
};
|
||||
|
||||
buildInputs = stdenv.lib.optionals doCheck [ vmprof pyqt4 ];
|
||||
|
||||
propagatedBuildInputs = [ scons ];
|
||||
|
||||
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;
|
||||
homepage = http://nuitka.net/;
|
||||
};
|
||||
|
||||
}
|
|
@ -2954,49 +2954,7 @@ in {
|
|||
|
||||
numexpr = callPackage ../development/python-modules/numexpr { };
|
||||
|
||||
Nuitka = 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 {
|
||||
version = "0.5.25";
|
||||
name = "Nuitka-${version}";
|
||||
|
||||
# Latest version is not yet on PyPi
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/kayhayen/Nuitka/archive/${version}.tar.gz";
|
||||
sha256 = "11psz0pyj56adv4b3f47hl8jakvp2mc2c85s092a5rsv1la1a0aa";
|
||||
};
|
||||
|
||||
buildInputs = with self; stdenv.lib.optionals doCheck [ vmprof pyqt4 ];
|
||||
|
||||
propagatedBuildInputs = [ scons ];
|
||||
|
||||
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 = {
|
||||
description = "Python compiler with full language support and CPython compatibility";
|
||||
license = licenses.asl20;
|
||||
homepage = http://nuitka.net/;
|
||||
};
|
||||
};
|
||||
Nuitka = callPackage ../development/python-modules/nuitka { };
|
||||
|
||||
numpy = callPackage ../development/python-modules/numpy {
|
||||
blas = pkgs.openblasCompat;
|
||||
|
|
Loading…
Reference in a new issue