about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pure-eval/default.nix
blob: 866b2bdcadf6f40987dea2ab43ce1cf38eaa182b (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
{ lib
, buildPythonPackage
, isPy3k
, fetchFromGitHub
, setuptools-scm
, toml
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "pure_eval";
  version = "0.2.1";

  disabled = !isPy3k;

  src = fetchFromGitHub {
    owner = "alexmojaki";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-+Vucu16NFPtQ23AbBH/cQU+klxp6DMicSScbnKegLZI=";
  };

  SETUPTOOLS_SCM_PRETEND_VERSION = version;

  buildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    toml
  ];

  checkInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [ "pure_eval" ];

  meta = with lib; {
    description = "Safely evaluate AST nodes without side effects";
    homepage = "https://github.com/alexmojaki/pure_eval";
    license = licenses.mit;
    maintainers = with maintainers; [ gebner ];
  };
}