summary refs log tree commit diff
path: root/pkgs/development/tools/ansible-lint/default.nix
blob: c460662f4f88c8c05960af72651a24592619ab1d (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
{ stdenv, fetchFromGitHub, pythonPackages, ansible }:

pythonPackages.buildPythonPackage rec {
  pname = "ansible-lint";
  version = "3.4.23";

  src = fetchFromGitHub {
    owner = "willthames";
    repo = "ansible-lint";
    rev = "v${version}";
    sha256 = "0cnfgxh5m7alzm811hc95jigbca5vc1pf8fjazmsakmhdjyfbpb7";
  };

  propagatedBuildInputs = with pythonPackages; [ pyyaml six ] ++ [ ansible ];

  checkInputs = [ pythonPackages.nose ];

  postPatch = ''
    patchShebangs bin/ansible-lint
  '';

  checkPhase = ''
    nosetests test
  '';

  meta = {
    homepage = "https://github.com/willthames/ansible-lint";
    description = "Best practices checker for Ansible";
    license = stdenv.lib.licenses.mit;
    maintainers = [ stdenv.lib.maintainers.sengaya ];
  };
}