Merge pull request #330509 from Sigmanificient/pygeoip

This commit is contained in:
Sandro
2024-08-23 17:27:52 +02:00
committed by GitHub
6 changed files with 33 additions and 119 deletions
@@ -1,28 +0,0 @@
{
lib,
buildPythonPackage,
fetchPypi,
nose,
}:
buildPythonPackage rec {
pname = "pygeoip";
version = "0.3.2";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "f22c4e00ddf1213e0fae36dc60b46ee7c25a6339941ec1a975539014c1f9a96d";
};
# requires geoip samples
doCheck = false;
buildInputs = [ nose ];
meta = with lib; {
description = "Pure Python GeoIP API";
homepage = "https://github.com/appliedsec/pygeoip";
license = licenses.lgpl3Plus;
};
}
@@ -6,20 +6,21 @@
geoip2,
ipython,
isPyPy,
setuptools,
praw,
pyenchant,
pygeoip,
pytestCheckHook,
pythonOlder,
pytz,
sqlalchemy,
xmltodict,
importlib-metadata,
}:
buildPythonPackage rec {
pname = "sopel";
version = "8.0.0";
format = "setuptools";
pyproject = true;
disabled = isPyPy || pythonOlder "3.7";
@@ -28,43 +29,47 @@ buildPythonPackage rec {
hash = "sha256-juLJp0Et5qMZwBZzw0e4tKg1cBYqAsH8KUzqNoIP70U=";
};
patches = [
# https://github.com/sopel-irc/sopel/issues/2401
# https://github.com/sopel-irc/sopel/commit/596adc44330939519784389cbb927435305ef758.patch
# rewrite the patch because there are too many patches needed to apply the above patch.
./python311-support.patch
];
build-system = [ setuptools ];
propagatedBuildInputs = [
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "setuptools~=66.1" "setuptools"
'';
dependencies = [
dnspython
geoip2
ipython
praw
pyenchant
pygeoip
pytz
sqlalchemy
xmltodict
importlib-metadata
];
pythonRemoveDeps = [ "sopel-help" ];
pythonRelaxDeps = [ "sqlalchemy" ];
nativeCheckInputs = [ pytestCheckHook ];
postPatch = ''
substituteInPlace requirements.txt \
--replace "praw>=4.0.0,<6.0.0" "praw" \
--replace "sqlalchemy<1.4" "sqlalchemy" \
--replace "xmltodict==0.12" "xmltodict>=0.12"
'';
preCheck = ''
export TESTDIR=$(mktemp -d)
cp -R ./test $TESTDIR
pushd $TESTDIR
'';
postCheck = ''
popd
'';
disabledTests = [
# requires network access
"test_example_exchange_cmd_0"
"test_example_exchange_cmd_1"
"test_example_duck_0"
"test_example_duck_1"
"test_example_suggest_0"
"test_example_suggest_1"
"test_example_suggest_2"
"test_example_tr2_0"
"test_example_tr2_1"
"test_example_tr2_2"
"test_example_title_command_0"
"test_example_wiktionary_0"
"test_example_wiktionary_ety_0"
];
pythonImportsCheck = [ "sopel" ];
-61
View File
@@ -1,61 +0,0 @@
{ lib, buildPythonApplication, fetchFromGitHub, wrapGAppsHook3, gobject-introspection, gtk3, pango
, pillow, pycurl, beautifulsoup4, pygeoip, pygobject3, cairocffi, selenium }:
buildPythonApplication rec {
pname = "xsser";
version = "1.8.4";
src = fetchFromGitHub {
owner = "epsylon";
repo = pname;
rev = "478242e6d8e1ca921e0ba8fa59b50106fa2f7312";
sha256 = "MsQu/r1C6uXawpuVTuBGhWNqCSZ9S2DIx15Lpo7L4RI=";
};
postPatch = ''
# Replace relative path with absolute store path
find . -type f -exec sed -i "s|core/fuzzing/user-agents.txt|$out/share/xsser/fuzzing/user-agents.txt|g" {} +
# Replace absolute path references with store paths
substituteInPlace core/main.py --replace /usr $out
substituteInPlace gtk/xsser.desktop --replace /usr $out
substituteInPlace setup.py --replace /usr/share share
'';
nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
buildInputs = [
gtk3
pango
];
propagatedBuildInputs = [
pillow
pycurl
beautifulsoup4
pygeoip
pygobject3
cairocffi
selenium
];
# Project has no tests
doCheck = false;
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
postInstall = ''
install -D core/fuzzing/user-agents.txt $out/share/xsser/fuzzing/user-agents.txt
'';
meta = with lib; {
description = "Automatic framework to detect, exploit and report XSS vulnerabilities in web-based applications";
mainProgram = "xsser";
homepage = "https://xsser.03c8.net/";
license = licenses.gpl3Only;
maintainers = with maintainers; [ emilytrau ];
};
}
-2
View File
@@ -39361,8 +39361,6 @@ with pkgs;
xsane = callPackage ../applications/graphics/sane/xsane.nix { };
xsser = python3Packages.callPackage ../tools/security/xsser { };
xsw = callPackage ../applications/misc/xsw {
# Enable the next line to use this in terminal.
# Note that it requires sixel capable terminals such as mlterm
+2
View File
@@ -436,6 +436,7 @@ mapAliases ({
pyramid_multiauth = pyramid-multiauth; # added 2023-08-24
pyreadability = readability-lxml; # added 2022-05-24
pyres = throw "pyres has been removed, since it is abandoned and broken"; # added 2023-06-20
pygeoip = throw "pygeoip has been removed, since it wash archived in April 2018"; # added 2024-07-27
pygeos = throw "pygeos has been removed, since it was merged with shapely 2.0"; # added 2024-05-26
pyRFC3339 = pyrfc3339; # added 2024-01-07
pyroute2-core = throw "pyroute2 migrated back to a single package scheme in version 0.7.1"; # added 2022-07-16
@@ -639,6 +640,7 @@ mapAliases ({
xapp = python-xapp; # added 2024-07-19
xenomapper = throw "xenomapper was moved to pkgs.xenomapper"; # added 2021-12-31
XlsxWriter = xlsxwriter; # added 2023-02-19
xsser = "xsser has been removed because it was unmaintained and relies on a archived project"; # added 2024-07-27
Yapsy = yapsy; # added 2023-02-19
yanc = throw "yanc has been removed because it relies on nose"; # added 2024-07-27
z3 = z3-solver; # added 2023-12-03
-2
View File
@@ -11555,8 +11555,6 @@ self: super: with self; {
pygdbmi = callPackage ../development/python-modules/pygdbmi { };
pygeoip = callPackage ../development/python-modules/pygeoip { };
pygetwindow = callPackage ../development/python-modules/pygetwindow { };
pygit2 = callPackage ../development/python-modules/pygit2 { };