summaryrefslogtreecommitdiffstats
path: root/pkgs/development/python-modules/bashlex/default.nix
blob: 9bbabfbc6e98659ead15194d4326d91ad405fb56 (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
33
34
35
36
37
38
39
40
41
42
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  python,
  setuptools,
  pytestCheckHook,
}:

buildPythonPackage (finalAttrs: {
  pname = "bashlex";
  version = "0.18";

  pyproject = true;

  __structuredAttrs = true;

  src = fetchFromGitHub {
    owner = "idank";
    repo = "bashlex";
    tag = finalAttrs.version;
    hash = "sha256-ddZN91H95RiTLXx4lpES1Dmz7nNsSVUeuFuOEpJ7LQI=";
  };

  build-system = [ setuptools ];

  # workaround https://github.com/idank/bashlex/issues/51
  preBuild = ''
    ${python.pythonOnBuildForHost.interpreter} -c 'import bashlex'
  '';

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "bashlex" ];

  meta = {
    description = "Python parser for bash";
    license = lib.licenses.gpl3Plus;
    homepage = "https://github.com/idank/bashlex";
    maintainers = with lib.maintainers; [ multun ];
  };
})