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

37 lines
824 B
Nix
Raw Normal View History

2018-03-06 01:11:42 +01:00
{ stdenv, fetchFromGitHub, pythonPackages, ansible }:
2018-03-04 14:06:10 +01:00
pythonPackages.buildPythonPackage rec {
pname = "ansible-lint";
2018-10-08 22:08:54 +02:00
version = "3.4.23";
2018-03-04 14:06:10 +01:00
2018-03-06 01:11:42 +01:00
src = fetchFromGitHub {
owner = "willthames";
repo = "ansible-lint";
rev = "v${version}";
2018-10-08 22:08:54 +02:00
sha256 = "0cnfgxh5m7alzm811hc95jigbca5vc1pf8fjazmsakmhdjyfbpb7";
2018-03-04 14:06:10 +01:00
};
propagatedBuildInputs = with pythonPackages; [ pyyaml six ] ++ [ ansible ];
2018-03-06 01:11:42 +01:00
checkInputs = [ pythonPackages.nose ];
postPatch = ''
patchShebangs bin/ansible-lint
'';
2018-11-02 23:46:13 +01:00
preBuild = ''
export HOME="$TMP"
'';
2018-03-06 01:11:42 +01:00
checkPhase = ''
nosetests test
'';
2018-03-04 14:06:10 +01: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 ];
};
}