diff --git a/pkgs/development/python-modules/configargparse/default.nix b/pkgs/development/python-modules/configargparse/default.nix new file mode 100644 index 000000000000..9d84400667a9 --- /dev/null +++ b/pkgs/development/python-modules/configargparse/default.nix @@ -0,0 +1,21 @@ +{ stdenv, lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "ConfigArgParse"; + version = "0.12.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"; + }; + + # no tests in tarball + doCheck = false; + + meta = with lib; { + description = "A drop-in replacement for argparse"; + homepage = https://github.com/zorro3/ConfigArgParse; + license = licenses.mit; + maintainer = [ maintainers.willibutz ]; + }; +} diff --git a/pkgs/tools/admin/gixy/default.nix b/pkgs/tools/admin/gixy/default.nix new file mode 100644 index 000000000000..77451a6bc9e3 --- /dev/null +++ b/pkgs/tools/admin/gixy/default.nix @@ -0,0 +1,41 @@ +{ lib, fetchFromGitHub, python }: + +python.pkgs.buildPythonApplication rec { + name = "gixy-${version}"; + version = "0.1.8"; + + # package is only compatible with python 2.7 and 3.5+ + disabled = with python.pkgs; !(pythonAtLeast "3.5" || isPy27); + + src = fetchFromGitHub { + owner = "yandex"; + repo = "gixy"; + rev = "v${version}"; + sha256 = "0dg8j8pqlzdvmyfkphrizfqzggr64npb9mnm1dcwm6c3z6k2b0ii"; + }; + + postPatch = '' + sed -ie '/argparse/d' setup.py + ''; + + propagatedBuildInputs = with python.pkgs; [ + cached-property + ConfigArgParse + pyparsing + jinja2 + nose + six + ]; + + meta = with lib; { + description = "Nginx configuration static analyzer"; + longDescription = '' + Gixy is a tool to analyze Nginx configuration. + The main goal of Gixy is to prevent security misconfiguration and automate flaw detection. + ''; + homepage = https://github.com/yandex/gixy; + license = licenses.mpl20; + maintainers = [ maintainers.willibutz ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 314d7c287ef9..82f3ff13d17b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1096,6 +1096,8 @@ with pkgs; gist = callPackage ../tools/text/gist { }; + gixy = callPackage ../tools/admin/gixy { }; + glide = callPackage ../development/tools/glide { }; glock = callPackage ../development/tools/glock { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6606dee344db..11a44e5f0bc0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8641,28 +8641,7 @@ in { buildInputs = with self; [ nose ]; }; - ConfigArgParse = buildPythonPackage rec { - name = "ConfigArgParse-${version}"; - version = "0.9.3"; - - src = pkgs.fetchurl { - url = "mirror://pypi/C/ConfigArgParse/ConfigArgParse-${version}.tar.gz"; - sha256 = "0a984pvv7370yz7zbkl6s6i7yyl9myahx0m9jkjvg3hz5q8mf70l"; - }; - - # no tests in tarball - doCheck = false; - propagatedBuildInputs = with self; [ - - ]; - buildInputs = with self; [ - - ]; - - meta = with stdenv.lib; { - homepage = "https://github.com/zorro3/ConfigArgParse"; - }; - }; + ConfigArgParse = callPackage ../development/python-modules/configargparse { }; jsonschema = callPackage ../development/python-modules/jsonschema { };