From 35d5dd7989580540453f47dd331bc1975949c7d8 Mon Sep 17 00:00:00 2001 From: "Samuel W. Flint" Date: Wed, 21 Sep 2022 12:21:13 -0500 Subject: [PATCH 1/2] readstat: init at 1.1.8 The readstat package allows for reading and manipulating SAS/Stata/SPSS data files. This can be useful for interacting and interoperating with datasets distributed in these formats. --- .../science/math/readstat/default.nix | 22 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/applications/science/math/readstat/default.nix diff --git a/pkgs/applications/science/math/readstat/default.nix b/pkgs/applications/science/math/readstat/default.nix new file mode 100644 index 000000000000..51ee824b6ff1 --- /dev/null +++ b/pkgs/applications/science/math/readstat/default.nix @@ -0,0 +1,22 @@ +{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config }: + +stdenv.mkDerivation rec { + name = "readstat"; + version = "1.1.8"; + + src = fetchFromGitHub { + owner = "WizardMac"; + repo = "ReadStat"; + rev = "v${version}"; + sha256 = "1r04lq45h1yn34v1mgfiqjfzyaqv4axqlby0nkandamcsqyhc7y4"; + }; + + nativeBuildInputs = [ pkg-config autoreconfHook ]; + + meta = { + homepage = "https://github.com/WizardMac/ReadStat"; + description = "Command-line tool (+ C library) for converting SAS, Stata, and SPSS files"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ swflint ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ac351e13aba7..e0925431a8c8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10510,6 +10510,8 @@ with pkgs; read-edid = callPackage ../os-specific/linux/read-edid { }; + readstat = callPackage ../applications/science/math/readstat { }; + redir = callPackage ../tools/networking/redir { }; redmine = callPackage ../applications/version-management/redmine { }; From f5355f8a3814417490e0dc4783ee8149772ff230 Mon Sep 17 00:00:00 2001 From: "Samuel W. Flint" Date: Wed, 21 Sep 2022 12:36:09 -0500 Subject: [PATCH 2/2] pyreadstat: init at 1.1.9 --- .../python-modules/pyreadstat/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/pyreadstat/default.nix diff --git a/pkgs/development/python-modules/pyreadstat/default.nix b/pkgs/development/python-modules/pyreadstat/default.nix new file mode 100644 index 000000000000..499aa97db8c7 --- /dev/null +++ b/pkgs/development/python-modules/pyreadstat/default.nix @@ -0,0 +1,34 @@ +{ lib, buildPythonPackage, fetchFromGitHub, cython, zlib, pandas, readstat }: + +buildPythonPackage rec { + pname = "pyreadstat"; + version = "1.1.9"; + + src = fetchFromGitHub { + owner = "Roche"; + repo = "pyreadstat"; + rev = "v${version}"; + sha256 = "16aa16ybh3ikmlxsg8zm19x9k6r4gpd0sxqagv318w76jjyw1nrs"; + }; + + nativeBuildInputs = [ + cython + ]; + + buildInputs = [ + zlib + ]; + + propagatedBuildInputs = [ + readstat + pandas + ]; + + meta = { + homepage = "https://github.com/Roche/pyreadstat"; + description = "Python package to read SAS, SPSS and Stata files into pandas data frames using the readstat C library"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ swflint ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eb4600bcaaec..6da11b306108 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9469,6 +9469,8 @@ in { readme_renderer = callPackage ../development/python-modules/readme_renderer { }; + readstats = callPackage ../development/python-modules/pyreadstat { }; + readthedocs-sphinx-ext = callPackage ../development/python-modules/readthedocs-sphinx-ext { }; rebulk = callPackage ../development/python-modules/rebulk { };