git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #118142 from fabaff/xcat
commitc6db6ad3b2d28dd78c40a7f6332058f27cb8b7ec authorSandro <sandro.jaeckel@gmail.com> dateWed 31 Mar 2021, 23:30 (6 years ago) parent94630fd42cbdb8
4 files changed+100
pkgs/development/python-modules/xpath-expressions/default.nix+46 pkgs/tools/security/xcat/default.nix+50 pkgs/top-level/all-packages.nix+2 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/xpath-expressions/default.nixnew file+46
@@ -0,0 +1,46 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, lxml
5+, poetry-core
6+, pythonOlder
7+, pytestCheckHook
8+}:
9+
10+buildPythonPackage rec {
11+ pname = "xpath-expressions";
12+ version = "1.1.0";
13+ disabled = pythonOlder "3.5";
14+ format = "pyproject";
15+
16+ src = fetchFromGitHub {
17+ owner = "orf";
18+ repo = pname;
19+ rev = "v${version}";
20+ sha256 = "0l289iw2zmzxyfi3g2z7b917vmsaz47h5jp871zvykpmpigc632h";
21+ };
22+
23+ nativeBuildInputs = [
24+ poetry-core
25+ ];
26+
27+ checkInputs = [
28+ lxml
29+ pytestCheckHook
30+ ];
31+
32+ postPatch = ''
33+ # Was fixed upstream but not released
34+ substituteInPlace pyproject.toml \
35+ --replace "poetry.masonry.api" "poetry.core.masonry.api"
36+ '';
37+
38+ pythonImportsCheck = [ "xpath" ];
39+
40+ meta = with lib; {
41+ description = "Python module to handle XPath expressions";
42+ homepage = "https://github.com/orf/xpath-expressions";
43+ license = with licenses; [ mit ];
44+ maintainers = with maintainers; [ fab ];
45+ };
46+}
pkgs/tools/security/xcat/default.nixnew file+50
@@ -0,0 +1,50 @@
1+{ lib
2+, fetchFromGitHub
3+, python3
4+}:
5+
6+python3.pkgs.buildPythonApplication rec {
7+ pname = "xcat";
8+ version = "1.2.0";
9+ disabled = python3.pythonOlder "3.7";
10+ format = "pyproject";
11+
12+ src = fetchFromGitHub {
13+ owner = "orf";
14+ repo = pname;
15+ rev = "v${version}";
16+ sha256 = "01r5998gdvqjdrahpk0ci27lx9yghbddlanqcspr3qp5y5930i0s";
17+ };
18+
19+ nativeBuildInputs = with python3.pkgs; [
20+ poetry-core
21+ ];
22+
23+ propagatedBuildInputs = with python3.pkgs; [
24+ aiodns
25+ aiohttp
26+ appdirs
27+ cchardet
28+ click
29+ colorama
30+ prompt_toolkit
31+ xpath-expressions
32+ ];
33+
34+ # Project has no tests
35+ doCheck = false;
36+ pythonImportsCheck = [ "xcat" ];
37+
38+ meta = with lib; {
39+ description = "XPath injection tool";
40+ longDescription = ''
41+ xcat is an advanced tool for exploiting XPath injection vulnerabilities,
42+ featuring a comprehensive set of features to read the entire file being
43+ queried as well as other files on the filesystem, environment variables
44+ and directories.
45+ '';
46+ homepage = "https://github.com/orf/xcat";
47+ license = with licenses; [ mit ];
48+ maintainers = with maintainers; [ fab ];
49+ };
50+}
pkgs/top-level/all-packages.nix+2
@@ -26557,6 +26557,8 @@ in
2655726557
2655826558 xcape = callPackage ../tools/X11/xcape { };
2655926559
26560+ xcat = callPackage ../tools/security/xcat { };
26561+
2656026562 xchainkeys = callPackage ../tools/X11/xchainkeys { };
2656126563
2656226564 xchm = callPackage ../applications/misc/xchm { };
pkgs/top-level/python-packages.nix+2
@@ -8978,6 +8978,8 @@ in {
89788978
89798979 xnd = callPackage ../development/python-modules/xnd { };
89808980
8981+ xpath-expressions = callPackage ../development/python-modules/xpath-expressions { };
8982+
89818983 xpybutil = callPackage ../development/python-modules/xpybutil { };
89828984
89838985 xstatic-bootbox = callPackage ../development/python-modules/xstatic-bootbox { };