From 5e976f8f6dd4865f1e028daac7f12095c5a7122b Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Fri, 21 Oct 2022 11:18:30 -0700 Subject: [PATCH 1/3] readstat, python3Packages.pyreadstat: fix build on Darwin --- pkgs/applications/science/math/readstat/default.nix | 4 +++- pkgs/development/python-modules/pyreadstat/default.nix | 4 ++++ pkgs/top-level/all-packages.nix | 4 +++- pkgs/top-level/python-packages.nix | 4 +++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/math/readstat/default.nix b/pkgs/applications/science/math/readstat/default.nix index 51ee824b6ff1..7621c2dfdff7 100644 --- a/pkgs/applications/science/math/readstat/default.nix +++ b/pkgs/applications/science/math/readstat/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, libiconv }: stdenv.mkDerivation rec { name = "readstat"; @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config autoreconfHook ]; + buildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ libiconv ]; + meta = { homepage = "https://github.com/WizardMac/ReadStat"; description = "Command-line tool (+ C library) for converting SAS, Stata, and SPSS files"; diff --git a/pkgs/development/python-modules/pyreadstat/default.nix b/pkgs/development/python-modules/pyreadstat/default.nix index 4992d260471c..c6197fcd7448 100644 --- a/pkgs/development/python-modules/pyreadstat/default.nix +++ b/pkgs/development/python-modules/pyreadstat/default.nix @@ -1,7 +1,9 @@ { lib +, stdenv , buildPythonPackage , cython , fetchFromGitHub +, libiconv , pandas , python , pythonOlder @@ -29,6 +31,8 @@ buildPythonPackage rec { buildInputs = [ zlib + ] ++ lib.optionals stdenv.isDarwin [ + libiconv ]; propagatedBuildInputs = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7ebca4b24c28..17640d5909cb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10744,7 +10744,9 @@ with pkgs; read-edid = callPackage ../os-specific/linux/read-edid { }; - readstat = callPackage ../applications/science/math/readstat { }; + readstat = callPackage ../applications/science/math/readstat { + inherit (pkgs.darwin) libiconv; + }; redir = callPackage ../tools/networking/redir { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 320b9b2f03a4..088e49d7c54e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8493,7 +8493,9 @@ in { pyramid_multiauth = callPackage ../development/python-modules/pyramid_multiauth { }; - pyreadstat = callPackage ../development/python-modules/pyreadstat { }; + pyreadstat = callPackage ../development/python-modules/pyreadstat { + inherit (pkgs.darwin) libiconv; + }; pyrealsense2 = toPythonModule (pkgs.librealsense.override { enablePython = true; From 68e7084c32b18d5310ffe72fb6221738c42436ec Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Fri, 21 Oct 2022 11:41:19 -0700 Subject: [PATCH 2/3] python3Packages.pandas-stubs: fix build on Darwin --- pkgs/development/python-modules/pandas-stubs/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/pandas-stubs/default.nix b/pkgs/development/python-modules/pandas-stubs/default.nix index a719f98e9d1d..9719b918b6eb 100644 --- a/pkgs/development/python-modules/pandas-stubs/default.nix +++ b/pkgs/development/python-modules/pandas-stubs/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , jinja2 @@ -101,6 +102,8 @@ buildPythonPackage rec { "test_dummies" "test_from_dummies_args" "test_rolling_step_method" + ] ++ lib.optionals stdenv.isDarwin [ + "test_plotting" # Fatal Python error: Illegal instruction ]; pythonImportsCheck = [ From cae1aec6b4b6f74cd2a101a0fe7c50c94a68190c Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Fri, 21 Oct 2022 12:03:44 -0700 Subject: [PATCH 3/3] openai: 0.23.1 -> 0.24.0 --- pkgs/development/python-modules/openai/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/openai/default.nix b/pkgs/development/python-modules/openai/default.nix index b6c539150ccd..3f8883b47989 100644 --- a/pkgs/development/python-modules/openai/default.nix +++ b/pkgs/development/python-modules/openai/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "openai"; - version = "0.23.1"; + version = "0.24.0"; format = "setuptools"; disabled = pythonOlder "3.7.1"; @@ -29,7 +29,7 @@ buildPythonPackage rec { owner = "openai"; repo = "openai-python"; rev = "v${version}"; - hash = "sha256-4RdER6ecvHGXTLZ1GnBNI1hIETI8O/t+kuOXiQhMigs="; + hash = "sha256-0bXJoEq8FHRNaFMjncIwDbJROtFz/IJ4gD+LfvmtFUg="; }; propagatedBuildInputs = [ @@ -72,7 +72,9 @@ buildPythonPackage rec { disabledTestPaths = [ # Requires a real API key "openai/tests/test_endpoints.py" + # openai: command not found "openai/tests/test_file_cli.py" + "openai/tests/test_long_examples_validator.py" ]; meta = with lib; {