about summary refs log tree commit diff
path: root/pkgs/by-name/cs
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2024-02-04 19:06:55 -0300
committerGitHub <noreply@github.com>2024-02-04 23:06:55 +0100
commit65d2770885cca56e2607bd2f1be24780c1a00b94 (patch)
treeed63347fa46f8993e48e9de19e87d3b96b267998 /pkgs/by-name/cs
parenta30ae78435b7c481233601eea523b9340ca0760f (diff)
csvkit: 1.1.1 -> 1.3.0 (#282340)
* csvkit: migrate to by-name

* csvkit: refactor

- get rid of rec
- get rid of nested with
- set pyproject instead of format
- change meta.maintainers:
  - remove vrthra
  - add AndersonTorres

* csvkit: 1.1.1 -> 1.2.0

* csvkit: remove sqlalchemy_1_4 pinning

* csvkit: 1.2.0 -> 1.3.0
Diffstat (limited to 'pkgs/by-name/cs')
-rw-r--r--pkgs/by-name/cs/csvkit/package.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/by-name/cs/csvkit/package.nix b/pkgs/by-name/cs/csvkit/package.nix
new file mode 100644
index 0000000000000..bdd66083fd081
--- /dev/null
+++ b/pkgs/by-name/cs/csvkit/package.nix
@@ -0,0 +1,48 @@
+{ lib
+, python3
+, fetchPypi
+}:
+
+let
+  pname = "csvkit";
+  version = "1.3.0";
+  pythonEnv = python3;
+in
+pythonEnv.pkgs.buildPythonApplication {
+  inherit pname version;
+  pyproject = true;
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-uC5q4tK7QWUXEA7Lro1dhWoN/65CtxIIiBSityAeGvg=";
+  };
+
+  propagatedBuildInputs = with pythonEnv.pkgs; [
+    agate
+    agate-excel
+    agate-dbf
+    agate-sql
+    setuptools # csvsql imports pkg_resources
+  ];
+
+  nativeCheckInputs = with pythonEnv.pkgs; [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "csvkit"
+  ];
+
+  disabledTests = [
+    # Tries to compare CLI output - and fails!
+    "test_decimal_format"
+  ];
+
+  meta = {
+    homepage = "https://github.com/wireservice/csvkit";
+    description = "A suite of command-line tools for converting to and working with CSV";
+    changelog = "https://github.com/wireservice/csvkit/blob/${version}/CHANGELOG.rst";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+  };
+}