From 61df5d13187b0633e6f264f4c9adb052d020399a Mon Sep 17 00:00:00 2001 From: Rob <86313040+robert-manchester@users.noreply.github.com> Date: Sat, 28 Oct 2023 12:36:24 -0700 Subject: [PATCH 1/2] python311Packages.nuitka: 1.1.5 -> 1.8.4 https://nuitka.net/posts/nuitka-release-18.html --- pkgs/development/python-modules/nuitka/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/nuitka/default.nix b/pkgs/development/python-modules/nuitka/default.nix index ca2272ac1bd5..e7637eda16d3 100644 --- a/pkgs/development/python-modules/nuitka/default.nix +++ b/pkgs/development/python-modules/nuitka/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "nuitka"; - version = "1.1.5"; + version = "1.8.4"; format = "setuptools"; src = fetchFromGitHub { owner = "Nuitka"; repo = "Nuitka"; rev = version; - hash = "sha256-8eWOcxATVS866nlN39b2VU1CuXAfcn0yQsDweHS2yDU="; + hash = "sha256-spa3V9KEjqmwnHSuxLLIu9hJk5PrRwNyOw72sfxBVKo="; }; nativeCheckInputs = [ vmprof ]; From 211bc94a890968aa61fc05763fdb6864f3945123 Mon Sep 17 00:00:00 2001 From: Rob <86313040+robert-manchester@users.noreply.github.com> Date: Sat, 28 Oct 2023 19:55:23 -0700 Subject: [PATCH 2/2] python311Packages.nuitka: add propagatedBuildInputs and enable pythonImportsCheck and checkPhase --- .../python-modules/nuitka/default.nix | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/nuitka/default.nix b/pkgs/development/python-modules/nuitka/default.nix index e7637eda16d3..f10cbb749304 100644 --- a/pkgs/development/python-modules/nuitka/default.nix +++ b/pkgs/development/python-modules/nuitka/default.nix @@ -1,17 +1,19 @@ -{ lib, stdenv +{ lib +, stdenv , buildPythonPackage +, ccache , fetchFromGitHub -, vmprof , isPyPy -, pkgs -, scons -, chrpath +, ordered-set +, python3 +, setuptools +, zstandard }: buildPythonPackage rec { pname = "nuitka"; version = "1.8.4"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "Nuitka"; @@ -20,30 +22,30 @@ buildPythonPackage rec { hash = "sha256-spa3V9KEjqmwnHSuxLLIu9hJk5PrRwNyOw72sfxBVKo="; }; - nativeCheckInputs = [ vmprof ]; - nativeBuildInputs = [ scons ]; - propagatedBuildInputs = [ chrpath ]; + nativeBuildInputs = [ setuptools ]; + nativeCheckInputs = [ ccache ]; - postPatch = '' - patchShebangs tests/run-tests - '' + lib.optionalString stdenv.isLinux '' - substituteInPlace nuitka/plugins/standard/ImplicitImports.py --replace 'locateDLL("uuid")' '"${lib.getLib pkgs.util-linux}/lib/libuuid.so"' - ''; - - # We do not want any wrappers here. - postFixup = ""; + propagatedBuildInputs = [ + ordered-set + zstandard + ]; checkPhase = '' - tests/run-tests + runHook preCheck + + ${python3.interpreter} tests/basics/run_all.py search + + runHook postCheck ''; - # Problem with a subprocess (parts) - doCheck = false; + pythonImportsCheck = [ "nuitka" ]; # Requires CPython disabled = isPyPy; meta = with lib; { + # tests fail with linker errors on darwin + broken = stdenv.isDarwin; description = "Python compiler with full language support and CPython compatibility"; license = licenses.asl20; homepage = "https://nuitka.net/";