about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/robotstatuschecker/default.nix
blob: fb0d137c9b066e784267690e014133f2bbe5680f (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, robotframework
, python
}:

buildPythonPackage rec {
  pname = "robotstatuschecker";
  version = "3.0.1";
  pyproject = true;

  # no tests included in PyPI tarball
  src = fetchFromGitHub {
    owner = "robotframework";
    repo = "statuschecker";
    rev = "refs/tags/v${version}";
    hash = "sha256-yW6353gDwo/IzoWOB8oelaS6IUbvTtwwDT05yD7w6UA=";
  };

  postPatch = ''
    # https://github.com/robotframework/statuschecker/issues/46
    substituteInPlace test/tests.robot \
      --replace-fail BuiltIn.Log Log
  '';

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [ robotframework ];

  checkPhase = ''
    runHook preCheck

    ${python.interpreter} test/run.py

    runHook postCheck
  '';

  meta = with lib; {
    description = "A tool for checking that Robot Framework test cases have expected statuses and log messages";
    homepage = "https://github.com/robotframework/statuschecker";
    license = licenses.asl20;
    maintainers = [ maintainers.marsam ];
  };
}