summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/defusedcsv/default.nix
blob: 7ff077da570c2d6da459acd8b0c5d4411086a74d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # tests
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "defusedcsv";
  version = "3.0.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "raphaelm";
    repo = "defusedcsv";
    tag = "v${version}";
    hash = "sha256-OEDZbltnh2tAM58Kk852W0so7oOSv7S+S046MjIOMfY=";
  };

  pythonImportsCheck = [ "defusedcsv.csv" ];

  nativeCheckInputs = [ pytestCheckHook ];

  meta = {
    description = "Python library to protect your users from Excel injections in CSV-format exports, drop-in replacement for standard library's csv module";
    homepage = "https://github.com/raphaelm/defusedcsv";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ hexa ];
  };
}