3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #118142 from fabaff/xcat

This commit is contained in:
Sandro 2021-03-31 23:30:31 +02:00 committed by GitHub
commit c6db6ad3b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 100 additions and 0 deletions

View file

@ -0,0 +1,46 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, lxml
, poetry-core
, pythonOlder
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "xpath-expressions";
version = "1.1.0";
disabled = pythonOlder "3.5";
format = "pyproject";
src = fetchFromGitHub {
owner = "orf";
repo = pname;
rev = "v${version}";
sha256 = "0l289iw2zmzxyfi3g2z7b917vmsaz47h5jp871zvykpmpigc632h";
};
nativeBuildInputs = [
poetry-core
];
checkInputs = [
lxml
pytestCheckHook
];
postPatch = ''
# Was fixed upstream but not released
substituteInPlace pyproject.toml \
--replace "poetry.masonry.api" "poetry.core.masonry.api"
'';
pythonImportsCheck = [ "xpath" ];
meta = with lib; {
description = "Python module to handle XPath expressions";
homepage = "https://github.com/orf/xpath-expressions";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,50 @@
{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "xcat";
version = "1.2.0";
disabled = python3.pythonOlder "3.7";
format = "pyproject";
src = fetchFromGitHub {
owner = "orf";
repo = pname;
rev = "v${version}";
sha256 = "01r5998gdvqjdrahpk0ci27lx9yghbddlanqcspr3qp5y5930i0s";
};
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
propagatedBuildInputs = with python3.pkgs; [
aiodns
aiohttp
appdirs
cchardet
click
colorama
prompt_toolkit
xpath-expressions
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "xcat" ];
meta = with lib; {
description = "XPath injection tool";
longDescription = ''
xcat is an advanced tool for exploiting XPath injection vulnerabilities,
featuring a comprehensive set of features to read the entire file being
queried as well as other files on the filesystem, environment variables
and directories.
'';
homepage = "https://github.com/orf/xcat";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -26557,6 +26557,8 @@ in
xcape = callPackage ../tools/X11/xcape { };
xcat = callPackage ../tools/security/xcat { };
xchainkeys = callPackage ../tools/X11/xchainkeys { };
xchm = callPackage ../applications/misc/xchm { };

View file

@ -8978,6 +8978,8 @@ in {
xnd = callPackage ../development/python-modules/xnd { };
xpath-expressions = callPackage ../development/python-modules/xpath-expressions { };
xpybutil = callPackage ../development/python-modules/xpybutil { };
xstatic-bootbox = callPackage ../development/python-modules/xstatic-bootbox { };