Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible-lint: init at 3.4.20 #36250

Merged
merged 2 commits into from Mar 6, 2018
Merged

ansible-lint: init at 3.4.20 #36250

merged 2 commits into from Mar 6, 2018

Conversation

sengaya
Copy link
Contributor

@sengaya sengaya commented Mar 3, 2018

Motivation for this change

Add ansible-lint, a linter for ansible playbooks

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@@ -712,6 +712,7 @@
timor = "timor <timor.dd@googlemail.com>";
tiramiseb = "Sébastien Maccagnoni <sebastien@maccagnoni.eu>";
titanous = "Jonathan Rudenberg <jonathan@titanous.com>";
tlo = "Thilo Uttendorfer <tlo@sengaya.de>";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use your github handle here instead

{ stdenv, pythonPackages, fetchurl, ansible }:

pythonPackages.buildPythonPackage rec {
name = "ansible-lint-${version}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name attribute is added by buildPython* and should therefore be removed.

name = "ansible-lint-${version}";
version = "3.4.20";

src = fetchurl {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetchPypi is preferred unless tests are not included

sha256 = "b7fb92f00b9723e3a9624d70b53b60db41426c0ef4fad05ab28c7e4f28a0b6e2";
};

propagatedBuildInputs = with pythonPackages; [ pyyaml six ] ++ [ ansible ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to be interesting, as ansible is used here as a module. In order to make this reliably work we should make ansible a Python library instead of an application.

@sengaya
Copy link
Contributor Author

sengaya commented Mar 3, 2018

@FRidh Thanks for the feedback, much appreciated!

With fetchPypi I get an error similar to #29169
With doCheck = false; it works, but that's probably not the right way to "fix" it?

I probably need some help with the "make ansible a lib" topic. Should there be two packages, something like libansible and ansible? Is there a comparable package in nixpkgs where I could have a look?

@Mic92 Mic92 merged commit 07bc1dd into NixOS:master Mar 6, 2018
vcunat pushed a commit that referenced this pull request Mar 7, 2018
ansible-lint: init at 3.4.20
(cherry picked from commit 07bc1dd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants