From a75207e966c24b2c5d9a57e9fbea4dcc70f1742e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Nov 2021 17:31:48 +0100 Subject: [PATCH 1/3] python3Packages.socid-extractor: init at 0.0.22 --- .../socid-extractor/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/socid-extractor/default.nix diff --git a/pkgs/development/python-modules/socid-extractor/default.nix b/pkgs/development/python-modules/socid-extractor/default.nix new file mode 100644 index 000000000000..34c0c20e075a --- /dev/null +++ b/pkgs/development/python-modules/socid-extractor/default.nix @@ -0,0 +1,43 @@ +{ lib +, beautifulsoup4 +, buildPythonPackage +, fetchFromGitHub +, python-dateutil +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "socid-extractor"; + version = "0.0.22"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "soxoj"; + repo = pname; + rev = "v${version}"; + sha256 = "kHF9CBlUKrD/DRVwJveenpFMr7pIrxEBNkFHHLa46KQ="; + }; + + propagatedBuildInputs = [ + beautifulsoup4 + python-dateutil + requests + ]; + + # Test require network access + doCheck = false; + + pythonImportsCheck = [ + "socid_extractor" + ]; + + meta = with lib; { + description = "Python module to extract details from personal pages"; + homepage = "https://github.com/soxoj/socid-extractor"; + license = with licenses; [ gpl3Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6002b1220813..0e434b6a9b1c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8803,6 +8803,8 @@ in { socialscan = callPackage ../development/python-modules/socialscan { }; + socid-extractor = callPackage ../development/python-modules/socid-extractor { }; + sockjs = callPackage ../development/python-modules/sockjs { }; sockjs-tornado = callPackage ../development/python-modules/sockjs-tornado { }; From 1f2c16475455fb4a83465e152886d400cb211d30 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Nov 2021 17:58:48 +0100 Subject: [PATCH 2/3] python3Packages.xmind: init at 1.2.0 --- .../python-modules/xmind/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/xmind/default.nix diff --git a/pkgs/development/python-modules/xmind/default.nix b/pkgs/development/python-modules/xmind/default.nix new file mode 100644 index 000000000000..ab12f26a72df --- /dev/null +++ b/pkgs/development/python-modules/xmind/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +}: + +buildPythonPackage rec { + pname = "xmind"; + version = "1.2.0"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "zhuifengshen"; + repo = pname; + rev = "v${version}"; + sha256 = "xC1WpHz2eHb5+xShM/QUQAIYnJNyK1EKWbTXJKhDwbQ="; + }; + + # Projec thas no tests + doCheck = false; + + pythonImportsCheck = [ + "xmind" + ]; + + meta = with lib; { + description = "Python module to create mindmaps"; + homepage = "https://github.com/zhuifengshen/xmind"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0e434b6a9b1c..7bf6e52459c7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10147,6 +10147,8 @@ in { xlwt = callPackage ../development/python-modules/xlwt { }; + xmind = callPackage ../development/python-modules/xmind { }; + xml2rfc = callPackage ../development/python-modules/xml2rfc { }; xmldiff = callPackage ../development/python-modules/xmldiff { }; From cd959d22517bebb1d767a91c758f626e16337536 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Nov 2021 17:59:11 +0100 Subject: [PATCH 3/3] maigret: init at 0.3.1 --- pkgs/tools/security/maigret/default.nix | 92 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 94 insertions(+) create mode 100644 pkgs/tools/security/maigret/default.nix diff --git a/pkgs/tools/security/maigret/default.nix b/pkgs/tools/security/maigret/default.nix new file mode 100644 index 000000000000..08ef82ff9d6e --- /dev/null +++ b/pkgs/tools/security/maigret/default.nix @@ -0,0 +1,92 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "maigret"; + version = "0.3.1"; + + src = fetchFromGitHub { + owner = "soxoj"; + repo = pname; + rev = "v${version}"; + sha256 = "cq7pATICVQa2yTx2uiP58OBTn4B6iCjIB6LMmpaQfx0="; + }; + + propagatedBuildInputs = with python3.pkgs; [ + aiodns + aiohttp + aiohttp-socks + arabic-reshaper + async-timeout + attrs + beautifulsoup4 + certifi + chardet + colorama + future + html5lib + idna + jinja2 + lxml + markupsafe + mock + multidict + networkx + pycountry + pypdf2 + pysocks + python-bidi + pyvis + requests + requests-futures + six + socid-extractor + soupsieve + stem + torrequest + tqdm + typing-extensions + webencodings + xhtml2pdf + xmind + yarl + ]; + + checkInputs = with python3.pkgs; [ + pytest-httpserver + pytest-asyncio + pytestCheckHook + ]; + + postPatch = '' + # Remove all version pinning + sed -i -e "s/==[0-9.]*//" requirements.txt + # We are not build for Python < 3.7 + sed -i -e '/future-annotations/d' requirements.txt + # We can't work with dummy packages + sed -i -e 's/bs4/beautifulsoup4/g' requirements.txt + ''; + + disabledTests = [ + # Tests require network access + "test_extract_ids_from_page" + "test_import_aiohttp_cookies" + "test_maigret_results" + "test_pdf_report" + "test_self_check_db_negative_enabled" + "test_self_check_db_positive_enable" + ]; + + pythonImportsCheck = [ + "maigret" + ]; + + meta = with lib; { + description = "Tool to collect details about an username"; + homepage = "https://maigret.readthedocs.io"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 96cea130180a..406f301b40f4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3278,6 +3278,8 @@ with pkgs; lynis = callPackage ../tools/security/lynis { }; + maigret = callPackage ../tools/security/maigret { }; + mapcidr = callPackage ../tools/misc/mapcidr { }; mapproxy = callPackage ../applications/misc/mapproxy { };