From 30b30332967dc5caadd84c3d5930221e5c7813d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 22 Apr 2022 04:30:16 +0200 Subject: [PATCH 1/4] python310Packages.pycapnp: move things to nativeBuildInputs --- pkgs/development/python-modules/pycapnp/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pycapnp/default.nix b/pkgs/development/python-modules/pycapnp/default.nix index 8c63a11862239..cd2e8f450cd2b 100644 --- a/pkgs/development/python-modules/pycapnp/default.nix +++ b/pkgs/development/python-modules/pycapnp/default.nix @@ -20,16 +20,18 @@ buildPythonPackage rec { sha256 = "1xi6df93ggkpmwckwbi356v7m32zv5qry8s45hvsps66dz438kmi"; }; - buildInputs = [ capnproto cython pkgconfig ]; + nativeBuildInputs = [ cython pkgconfig ]; - # Tests disabled due to dependency on jinja and various other libraries. + buildInputs = [ capnproto ]; + + # Tests depend on schema_capnp which fails to generate doCheck = false; pythonImportsCheck = [ "capnp" ]; meta = with lib; { + homepage = "https://capnproto.github.io/pycapnp/"; maintainers = with maintainers; [ cstrahan lukeadams ]; license = licenses.bsd2; - homepage = "https://capnproto.github.io/pycapnp/"; }; } From f7861fa5e02dda17c798df5933a52231cd67080b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 22 Apr 2022 04:30:54 +0200 Subject: [PATCH 2/4] python310Packages.ffcv: move pkgconfig to nativeBuildInputs --- pkgs/development/python-modules/ffcv/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/ffcv/default.nix b/pkgs/development/python-modules/ffcv/default.nix index 2aee132e294fc..809a9ca696d81 100644 --- a/pkgs/development/python-modules/ffcv/default.nix +++ b/pkgs/development/python-modules/ffcv/default.nix @@ -35,7 +35,8 @@ buildPythonPackage rec { --replace "'webdataset'," "" ''; - buildInputs = [ libjpeg pkgconfig ]; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libjpeg ]; propagatedBuildInputs = [ opencv4 numba pandas pytorch-pfn-extras terminaltables tqdm ]; # `ffcv._libffcv*.so` cannot be loaded in the nix build environment for some From 7409801908168470ecfec6c6565bef46eb72464e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 22 Apr 2022 04:50:47 +0200 Subject: [PATCH 3/4] python310Packages.onnx: fix script patching --- pkgs/development/python-modules/onnx/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/onnx/default.nix b/pkgs/development/python-modules/onnx/default.nix index e873f3256084d..2846042e8d457 100644 --- a/pkgs/development/python-modules/onnx/default.nix +++ b/pkgs/development/python-modules/onnx/default.nix @@ -1,5 +1,6 @@ { lib , buildPythonPackage +, bash , cmake , fetchPypi , isPy27 @@ -43,8 +44,9 @@ buildPythonPackage rec { postPatch = '' chmod +x tools/protoc-gen-mypy.sh.in - patchShebangs tools/protoc-gen-mypy.sh.in tools/protoc-gen-mypy.py - + patchShebangs tools/protoc-gen-mypy.py + substituteInPlace tools/protoc-gen-mypy.sh.in \ + --replace "/bin/bash" "${bash}/bin/bash" substituteInPlace setup.py \ --replace "setup_requires.append('pytest-runner')" "" ''; From 646b9a7dbc499e31d4ec57555c3b02a15af8e95e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 22 Apr 2022 04:54:32 +0200 Subject: [PATCH 4/4] python310Packages.pyvips: run tests, cleanup nativeBuildInputs --- .../python-modules/pyvips/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pyvips/default.nix b/pkgs/development/python-modules/pyvips/default.nix index b25d9d3b5ae44..3974767856677 100644 --- a/pkgs/development/python-modules/pyvips/default.nix +++ b/pkgs/development/python-modules/pyvips/default.nix @@ -1,23 +1,23 @@ -{ buildPythonPackage, fetchPypi, pytest-runner, pytestCheckHook, glib, vips, cffi -, pkg-config, pkgconfig, lib }: +{ buildPythonPackage, fetchFromGitHub, pytestCheckHook, glib, vips, cffi +, pkgconfig, lib }: buildPythonPackage rec { pname = "pyvips"; version = "2.1.16"; - src = fetchPypi { - inherit pname version; - sha256 = "654c03014a15f846786807a2ece6f525a8fec883d1c857742c8e37da149a81ed"; + src = fetchFromGitHub { + owner = "libvips"; + repo = "pyvips"; + rev = "v${version}"; + sha256 = "sha256-8CeQbx3f2i0lEU0wxPeUwHlUGtzOztzTOdFNjIDy8s0="; }; - nativeBuildInputs = [ pytest-runner pkgconfig pkg-config ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ glib vips ]; propagatedBuildInputs = [ cffi ]; - # tests are not included in pypi tarball - doCheck = false; checkInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "pyvips" ];