summary refs log tree commit diff
path: root/pkgs/development/python-modules/widlparser/default.nix
blob: 024852ca40678f0c05242d6a0f543350fe9325c5 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
# build inputs
, typing-extensions
}:

buildPythonPackage rec {
  pname = "widlparser";
  version = "1.0.12";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "plinss";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-T17fDWYd1naza/ao7kXWGcRIl2fzL1/Z9SaJiutZzqk=";
  };

  postPatch = ''
    sed -i -e 's/0.0.0/${version}/' setup.py
  '';

  propagatedBuildInputs = [
    typing-extensions
  ];

  pythonImportsCheck = [ "widlparser" ];

  meta = with lib; {
    description = "Stand-alone WebIDL Parser in Python";
    homepage = "https://github.com/plinss/widlparser";
    license = licenses.mit;
    maintainers = [];
  };
}