about summary refs log tree commit diff
path: root/pkgs/development/python-modules/snuggs/default.nix
blob: 914166113170442aea62ba373e6c80bc2a33a1dd (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  click,
  numpy,
  pyparsing,
  pytestCheckHook,
  hypothesis,
}:

buildPythonPackage rec {
  pname = "snuggs";
  version = "1.4.7";
  format = "setuptools";

  # Pypi doesn't ship the tests, so we fetch directly from GitHub
  src = fetchFromGitHub {
    owner = "mapbox";
    repo = pname;
    rev = version;
    sha256 = "1p3lh9s2ylsnrzbs931y2vn7mp2y2xskgqmh767c9l1a33shfgwf";
  };

  patches = [
    # Use non-strict xfail for failing tests
    # https://github.com/mapbox/snuggs/pull/28
    (fetchpatch {
      url = "https://github.com/sebastic/snuggs/commit/3b8e04a35ed33a7dd89f0194542b22c7bde867f4.patch";
      hash = "sha256-SfW4l4BH94rPdskRVHEsZM0twmlV9IPftRU/BBZsjBU=";
    })
  ];

  propagatedBuildInputs = [
    click
    numpy
    pyparsing
  ];

  nativeCheckInputs = [
    pytestCheckHook
    hypothesis
  ];

  meta = with lib; {
    description = "S-expressions for Numpy";
    license = licenses.mit;
    homepage = "https://github.com/mapbox/snuggs";
    maintainers = with maintainers; [ mredaelli ];
  };
}