From b79305dfdd1205b4acabdca07df5a5f8cfab52c9 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:40:50 +0200 Subject: [PATCH 01/13] treewide: fix typos --- pkgs/build-support/trivial-builders/default.nix | 2 +- pkgs/development/libraries/lief/default.nix | 2 +- pkgs/development/python-modules/torch/default.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 3bccc871a7dc..f2c3cf4a67e3 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -588,7 +588,7 @@ rec { makeSetupHook = { name ? lib.warn "calling makeSetupHook without passing a name is deprecated." "hook" , deps ? [ ] - # hooks go in nativeBuildInput so these will be nativeBuildInput + # hooks go in nativeBuildInputs so these will be nativeBuildInputs , propagatedBuildInputs ? [ ] # these will be buildInputs , depsTargetTargetPropagated ? [ ] diff --git a/pkgs/development/libraries/lief/default.nix b/pkgs/development/libraries/lief/default.nix index 1f7e8fdf2c49..2c67036eeba4 100644 --- a/pkgs/development/libraries/lief/default.nix +++ b/pkgs/development/libraries/lief/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ninja ]; - # Not a propagatedBuildInput because only the $py output needs it; $out is + # Not in propagatedBuildInputs because only the $py output needs it; $out is # just the library itself (e.g. C/C++ headers). buildInputs = with python.pkgs; [ python diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index bd6b1b262837..07e47e2a801e 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -468,7 +468,7 @@ buildPythonPackage rec { cuda_cccl # cuda_cudart # cuda_runtime.h and libraries cuda_cupti # For kineto - cuda_nvcc # crt/host_config.h; even though we include this in nativeBuildinputs, it's needed here too + cuda_nvcc # crt/host_config.h; even though we include this in nativeBuildInputs, it's needed here too cuda_nvml_dev # cuda_nvrtc cuda_nvtx # -llibNVToolsExt From 871a8481f3f41c634211878e45e4cfcb6428efe6 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:41:24 +0200 Subject: [PATCH 02/13] jackline: fix nativeBuildInputs typo --- .../networking/instant-messengers/jackline/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/jackline/default.nix b/pkgs/applications/networking/instant-messengers/jackline/default.nix index d4876e20370d..b5fe07ef7140 100644 --- a/pkgs/applications/networking/instant-messengers/jackline/default.nix +++ b/pkgs/applications/networking/instant-messengers/jackline/default.nix @@ -15,7 +15,7 @@ buildDunePackage rec { hash = "sha256-G2jjsc/i9Qgo0TP+ZE4gB/1cjuZ9l8R7e59K2DGD5GY="; }; - nativeBuildInpts = [ + nativeBuildInputs = [ ppx_sexp_conv ppx_deriving ]; From ad291eff6e725ab8ef4dc1fd64939df239328052 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:42:22 +0200 Subject: [PATCH 03/13] raspa-data: remove gzip the `nativeBuildInputs` had a typo anyway, so it was not in use --- pkgs/applications/science/molecular-dynamics/raspa/data.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/applications/science/molecular-dynamics/raspa/data.nix b/pkgs/applications/science/molecular-dynamics/raspa/data.nix index bcc9dc3b372e..3361393eef15 100644 --- a/pkgs/applications/science/molecular-dynamics/raspa/data.nix +++ b/pkgs/applications/science/molecular-dynamics/raspa/data.nix @@ -1,6 +1,5 @@ { lib , stdenvNoCC -, gzip , raspa }: @@ -10,8 +9,6 @@ stdenvNoCC.mkDerivation rec { outputs = [ "out" "doc" ]; - nativeBuildInpuhs = [ gzip ]; - installPhase = '' runHook preInstall mkdir -p "$out/share/raspa" From 496d66c83695d1759cdd285dba9beac6433e944b Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:43:43 +0200 Subject: [PATCH 04/13] tezos-rust-libs: fix pythonImportsCheck typo --- pkgs/development/libraries/tezos-rust-libs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/tezos-rust-libs/default.nix b/pkgs/development/libraries/tezos-rust-libs/default.nix index 85470f606f28..fb729caa1027 100644 --- a/pkgs/development/libraries/tezos-rust-libs/default.nix +++ b/pkgs/development/libraries/tezos-rust-libs/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ llvmPackages_12.llvm cargo ]; - propagatedBuildDeps = [ llvmPackages_12.libllvm ]; + propagatedBuildInputs = [ llvmPackages_12.libllvm ]; buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; buildPhase = '' From 731a66d13bdefb5aac8e17514b3c13978af06d5d Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:44:07 +0200 Subject: [PATCH 05/13] tezos-rust-libs: set meta recovered from 3584ce2fa914cd85da2b89a75d3fd4fe4ba575da --- pkgs/development/libraries/tezos-rust-libs/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/libraries/tezos-rust-libs/default.nix b/pkgs/development/libraries/tezos-rust-libs/default.nix index fb729caa1027..7469b5fab223 100644 --- a/pkgs/development/libraries/tezos-rust-libs/default.nix +++ b/pkgs/development/libraries/tezos-rust-libs/default.nix @@ -48,4 +48,11 @@ stdenv.mkDerivation rec { ''; cargoVendorDir = "./vendor"; + + meta = { + homepage = "https://gitlab.com/tezos/tezos-rust-libs"; + description = "Tezos: all rust dependencies and their dependencies"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.ulrikstrid ]; + }; } From f9ba61be40698cdf16478c2a92a46f10ed6a8a7e Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:45:36 +0200 Subject: [PATCH 06/13] python311Packages.django-pwa: fix pythonImportsCheck typo --- pkgs/development/python-modules/django-pwa/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/django-pwa/default.nix b/pkgs/development/python-modules/django-pwa/default.nix index 134a84852f66..0e8d3c9c5953 100644 --- a/pkgs/development/python-modules/django-pwa/default.nix +++ b/pkgs/development/python-modules/django-pwa/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ django ]; - pyImportCheck = [ "pwa" ]; + pythonImportsCheck = [ "pwa" ]; checkPhase = '' runHook preCheck From 71b3a52bb7717100f19564a493e32659352bded3 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:46:42 +0200 Subject: [PATCH 07/13] python311Packages.ipyniivue: fix nativeCheckInputs typo, build js from source --- .../python-modules/ipyniivue/default.nix | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/ipyniivue/default.nix b/pkgs/development/python-modules/ipyniivue/default.nix index 52bb55afff10..58e9e0829bab 100644 --- a/pkgs/development/python-modules/ipyniivue/default.nix +++ b/pkgs/development/python-modules/ipyniivue/default.nix @@ -1,8 +1,11 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + fetchNpmDeps, pythonOlder, + nodejs, + npmHooks, hatchling, hatch-vcs, anywidget, @@ -16,15 +19,32 @@ buildPythonPackage rec { disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - hash = "sha256-C0mYkguN4ZfxSLqETH3dUwXeoNcicrmAgp6e9IIT43s="; + src = fetchFromGitHub { + owner = "niivue"; + repo = "ipyniivue"; + rev = "v${version}"; + hash = "sha256-6DZmHVVxJspjUhJ9pzTmTvwAnQfvTp8OL2xZONz2XbU="; + }; + + npmDeps = fetchNpmDeps { + name = "${pname}-${version}-npm-deps"; + inherit src; + hash = "sha256-ZJRBGMNn5clxMavimfl6Jwqf7M2pRo+WLne0gUWOiJ8="; }; # We do not need the build hooks, because we do not need to # build any JS components; these are present already in the PyPI artifact. env.HATCH_BUILD_NO_HOOKS = true; + nativeBuildInputs = [ + nodejs + npmHooks.npmConfigHook + ]; + + preBuild = '' + npm run build + ''; + build-system = [ hatchling hatch-vcs @@ -32,7 +52,7 @@ buildPythonPackage rec { dependencies = [ anywidget ]; - nativeCheckImports = [ pytestCheckHook ]; + nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "ipyniivue" ]; meta = with lib; { From 0dee053eb228a901be9bdc55237246cf90478a86 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:48:40 +0200 Subject: [PATCH 08/13] python311Packages.openapi3: fix nativeCheckInputs typo, fix checkPhase --- .../python-modules/openapi3/default.nix | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/openapi3/default.nix b/pkgs/development/python-modules/openapi3/default.nix index ed2b1d5904aa..1ddd3a9bbfb6 100644 --- a/pkgs/development/python-modules/openapi3/default.nix +++ b/pkgs/development/python-modules/openapi3/default.nix @@ -2,11 +2,16 @@ lib, buildPythonPackage, pythonOlder, - fetchPypi, + fetchFromGitHub, requests, pyyaml, setuptools, pytestCheckHook, + pytest-asyncio, + uvloop, + hypercorn, + starlette, + pydantic_1, }: buildPythonPackage rec { @@ -15,9 +20,11 @@ buildPythonPackage rec { pyproject = true; disabled = pythonOlder "3.8"; - src = fetchPypi { - inherit pname version; - hash = "sha256-ohpJBXPYnKaa2ny+WFrbL8pJZCV/bzod9THxKBVFXSw="; + src = fetchFromGitHub { + owner = "Dorthu"; + repo = "openapi3"; + rev = version; + hash = "sha256-Crn+nRbptRycnWJzH8Tm/BBLcBSRCcNtLX8NoKnSDdA="; }; nativeBuildInputs = [ setuptools ]; @@ -27,7 +34,19 @@ buildPythonPackage rec { pyyaml ]; - nativeCheckinputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + pydantic_1 + uvloop + hypercorn + starlette + ]; + + disabledTestPaths = [ + # tests old fastapi behaviour + "tests/fastapi_test.py" + ]; pythonImportsCheck = [ "openapi3" ]; From 2d244d98c51981cb13e6a8707e076ee7ed8ea948 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:50:27 +0200 Subject: [PATCH 09/13] python311Packages.pycodestyle: fix nativeCheckInputs typo, fetch from github --- .../python-modules/pycodestyle/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pycodestyle/default.nix b/pkgs/development/python-modules/pycodestyle/default.nix index 9c6133207a3c..8f987478655d 100644 --- a/pkgs/development/python-modules/pycodestyle/default.nix +++ b/pkgs/development/python-modules/pycodestyle/default.nix @@ -1,7 +1,7 @@ { buildPythonPackage, pythonOlder, - fetchPypi, + fetchFromGitHub, lib, python, pytestCheckHook, @@ -15,14 +15,16 @@ buildPythonPackage rec { format = "setuptools"; - src = fetchPypi { - inherit pname version; - hash = "sha256-RC+VAUG09D33Ut0wNRH/3tOgTCtvt/ZZgFdPDDHm55w="; + src = fetchFromGitHub { + owner = "PyCQA"; + repo = "pycodestyle"; + rev = version; + hash = "sha256-YN1KOJ8f+VY9vJTWm3aTOOai66dveKOKOpeBkZKkC2A="; }; pythonImportsCheck = [ "pycodestyle" ]; - nativCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ pytestCheckHook ]; # https://github.com/PyCQA/pycodestyle/blob/2.11.0/tox.ini#L16 postCheck = '' From d2f22a8e8cc6768f3395eee22bba862963ac9975 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:50:58 +0200 Subject: [PATCH 10/13] python311Packages.pyogg: fix propagatedBuildInputs typo --- pkgs/development/python-modules/pyogg/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyogg/default.nix b/pkgs/development/python-modules/pyogg/default.nix index 62e5509d2e44..03d51fef67fa 100644 --- a/pkgs/development/python-modules/pyogg/default.nix +++ b/pkgs/development/python-modules/pyogg/default.nix @@ -12,7 +12,6 @@ }: buildPythonPackage rec { - pname = "pyogg"; version = "0.6.14a1"; @@ -29,7 +28,7 @@ buildPythonPackage rec { libopus ]; - propagatedBuidInputs = [ + propagatedBuildInputs = [ libvorbis flac libogg From f993429d0c4e17e6f949cfb0bf5e3d890cf76f01 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:52:23 +0200 Subject: [PATCH 11/13] python311Packages.summarytools: remove pytestCheckHook there are no tests upstream --- pkgs/development/python-modules/summarytools/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/python-modules/summarytools/default.nix b/pkgs/development/python-modules/summarytools/default.nix index 58457768fe0e..40b5359cb35e 100644 --- a/pkgs/development/python-modules/summarytools/default.nix +++ b/pkgs/development/python-modules/summarytools/default.nix @@ -8,7 +8,6 @@ matplotlib, numpy, pandas, - pytestCheckHook, }: buildPythonPackage rec { @@ -32,8 +31,6 @@ buildPythonPackage rec { pandas ]; - nativeCheckImports = [ pytestCheckHook ]; - pythonImportsCheck = [ "summarytools" ]; meta = with lib; { From 10ba0eba327678d5d29869cf14d20e7370980633 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:53:13 +0200 Subject: [PATCH 12/13] python311Packages.symengine: fix nativeBuildInputs typo --- pkgs/development/python-modules/symengine/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/symengine/default.nix b/pkgs/development/python-modules/symengine/default.nix index d59abb27c8d6..16893b3f6e64 100644 --- a/pkgs/development/python-modules/symengine/default.nix +++ b/pkgs/development/python-modules/symengine/default.nix @@ -42,13 +42,13 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.py \ - --replace-fail "\"cmake\"" "\"${lib.getExe' cmake "cmake"}\"" \ --replace-fail "'cython>=0.29.24'" "'cython'" export PATH=${cython}/bin:$PATH ''; - nativeBuildUnputs = [ cmake ]; + dontUseCmakeConfigure = true; + nativeBuildInputs = [ cmake ]; buildInputs = [ cython ]; @@ -58,8 +58,10 @@ buildPythonPackage rec { ]; checkPhase = '' + runHook preCheck mkdir empty && cd empty ${python.interpreter} ../bin/test_python.py + runHook postCheck ''; meta = with lib; { From 5c7c9ed4a7db36552d03664e1a038370df2b8693 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 28 May 2024 00:53:27 +0200 Subject: [PATCH 13/13] python311Packages.trimesh: update meta.homepage --- pkgs/development/python-modules/trimesh/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/trimesh/default.nix b/pkgs/development/python-modules/trimesh/default.nix index 272a5d535a31..3bae963820d6 100644 --- a/pkgs/development/python-modules/trimesh/default.nix +++ b/pkgs/development/python-modules/trimesh/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python library for loading and using triangular meshes"; - homepage = "https://trimsh.org/"; + homepage = "https://trimesh.org/"; changelog = "https://github.com/mikedh/trimesh/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [