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;