Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 46 lines 1.0 kB view raw
1{ lib 2, fetchPypi 3, buildPythonPackage 4, ansible 5, pyyaml 6, six 7, nose 8, setuptools_scm 9, ruamel_yaml 10}: 11 12buildPythonPackage rec { 13 pname = "ansible-lint"; 14 version = "4.1.0"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "9430ea6e654ba4bf5b9c6921efc040f46cda9c4fd2896a99ff71d21037bcb123"; 19 }; 20 21 nativeBuildInputs = [ setuptools_scm ]; 22 propagatedBuildInputs = [ pyyaml six ansible ruamel_yaml ]; 23 checkInputs = [ nose ]; 24 25 postPatch = '' 26 patchShebangs bin/ansible-lint 27 substituteInPlace setup.cfg \ 28 --replace "setuptools_scm_git_archive>=1.0" "" 29 ''; 30 31 # give a hint to setuptools_scm on package version 32 preBuild = '' 33 export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}" 34 ''; 35 36 checkPhase = '' 37 PATH=$out/bin:$PATH HOME=$(mktemp -d) nosetests test 38 ''; 39 40 meta = with lib; { 41 homepage = "https://github.com/willthames/ansible-lint"; 42 description = "Best practices checker for Ansible"; 43 license = licenses.mit; 44 maintainers = [ maintainers.sengaya ]; 45 }; 46}