summary refs log tree commit diff
path: root/pkgs/tools/misc/parquet-tools
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:33 +0000
committerAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:57 +0000
commit9ff36293d1e428cd7bf03e8d4b03611b6d361c28 (patch)
tree1ab51a42b868c55b83f6ccdb80371b9888739dd9 /pkgs/tools/misc/parquet-tools
parent1c4fcd0d4b0541e674ee56ace1053e23e562cc80 (diff)
parentddc3c396a51918043bb0faa6f676abd9562be62c (diff)
downloadnixpkgs-archive.tar
nixpkgs-archive.tar.gz
nixpkgs-archive.tar.bz2
nixpkgs-archive.tar.lz
nixpkgs-archive.tar.xz
nixpkgs-archive.tar.zst
nixpkgs-archive.zip
Last good Nixpkgs for Weston+nouveau? archive
I came this commit hash to terwiz[m] on IRC, who is trying to figure out
what the last version of Spectrum that worked on their NUC with Nvidia
graphics is.
Diffstat (limited to 'pkgs/tools/misc/parquet-tools')
-rw-r--r--pkgs/tools/misc/parquet-tools/default.nix69
1 files changed, 69 insertions, 0 deletions
diff --git a/pkgs/tools/misc/parquet-tools/default.nix b/pkgs/tools/misc/parquet-tools/default.nix
new file mode 100644
index 00000000000..46155dcb332
--- /dev/null
+++ b/pkgs/tools/misc/parquet-tools/default.nix
@@ -0,0 +1,69 @@
+{ lib
+, fetchFromGitHub
+, fetchpatch
+, python3Packages
+}:
+
+with python3Packages;
+
+buildPythonApplication rec {
+  pname = "parquet-tools";
+  version = "0.2.9";
+  disabled = pythonOlder "3.8";
+
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "ktrueda";
+    repo = "parquet-tools";
+    rev = version;
+    sha256 = "0aw0x7lhagp4dwis09fsizr7zbhdpliav0ns5ll5qny7x4m6rkfy";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/ktrueda/parquet-tools/commit/1c70a07e1c9f17c8890d23aad3ded5dd6c706cb3.patch";
+      sha256 = "08j1prdqj8ksw8gwiyj7ivshk82ahmywbzmywclw52nlnniig0sa";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace 'thrift = "^0.13.0"' 'thrift = "*"' \
+      --replace 'halo = "^0.0.29"' 'halo = "*"'
+    substituteInPlace tests/test_inspect.py \
+      --replace "parquet-cpp-arrow version 5.0.0" "parquet-cpp-arrow version ${pyarrow.version}" \
+      --replace "serialized_size: 2222" "serialized_size: 2221"
+  '';
+
+  nativeBuildInputs = [ poetry-core ];
+
+  propagatedBuildInputs = [
+    boto3
+    colorama
+    halo
+    pandas
+    pyarrow
+    tabulate
+    thrift
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    moto
+    pytest-mock
+  ];
+
+  disabledTests = [
+    # these tests try to read python code as parquet and fail
+    "test_local_wildcard"
+    "test_local_and_s3_wildcard_files"
+  ];
+
+  meta = with lib; {
+    description = "A CLI tool for parquet files";
+    homepage = "https://github.com/ktrueda/parquet-tools";
+    license = licenses.mit;
+    maintainers = with maintainers; [ cpcloud ];
+  };
+}