nixpkgs/pkgs/development/tools/ansible-lint/default.nix

37 lines
824 B
Nix
Raw Normal View History

2018-03-05 16:11:42 -08:00
{ stdenv, fetchFromGitHub, pythonPackages, ansible }:
2018-03-04 05:06:10 -08:00
pythonPackages.buildPythonPackage rec {
pname = "ansible-lint";
2018-10-08 13:08:54 -07:00
version = "3.4.23";
2018-03-04 05:06:10 -08:00
2018-03-05 16:11:42 -08:00
src = fetchFromGitHub {
owner = "willthames";
repo = "ansible-lint";
rev = "v${version}";
2018-10-08 13:08:54 -07:00
sha256 = "0cnfgxh5m7alzm811hc95jigbca5vc1pf8fjazmsakmhdjyfbpb7";
2018-03-04 05:06:10 -08:00
};
propagatedBuildInputs = with pythonPackages; [ pyyaml six ] ++ [ ansible ];
2018-03-05 16:11:42 -08:00
checkInputs = [ pythonPackages.nose ];
postPatch = ''
patchShebangs bin/ansible-lint
'';
2018-11-02 15:46:13 -07:00
preBuild = ''
export HOME="$TMP"
'';
2018-03-05 16:11:42 -08:00
checkPhase = ''
nosetests test
'';
2018-03-04 05:06:10 -08:00
meta = {
homepage = "https://github.com/willthames/ansible-lint";
description = "Best practices checker for Ansible";
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.sengaya ];
};
}