From 5461767bc168b1e68ea1cd3676c9d9946222bdd7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Jan 2024 11:43:55 +0100 Subject: [PATCH 1/3] python311Packages.pyppeteer: refactor --- .../python-modules/pyppeteer/default.nix | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/pyppeteer/default.nix b/pkgs/development/python-modules/pyppeteer/default.nix index 1cfb6d85680f..b0276c77bc05 100644 --- a/pkgs/development/python-modules/pyppeteer/default.nix +++ b/pkgs/development/python-modules/pyppeteer/default.nix @@ -18,17 +18,24 @@ buildPythonPackage rec { pname = "pyppeteer"; version = "1.0.2"; - format = "pyproject"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { - owner = pname; - repo = pname; - rev = version; + owner = "pyppeteer"; + repo = "pyppeteer"; + rev = "refs/tags/${version}"; hash = "sha256-izMaWtJdkLHMQbyq7o7n46xB8dOHXZ5uO0UXt+twjL4="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'pyee = "^8.1.0"' 'pyee = "*"' \ + --replace 'urllib3 = "^1.25.8"' 'urllib3 = "*"' \ + --replace 'websockets = "^10.0"' 'websockets = "*"' + ''; + nativeBuildInputs = [ poetry-core ]; @@ -49,12 +56,6 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'pyee = "^8.1.0"' 'pyee = "*"' \ - --replace 'websockets = "^9.1"' 'websockets = "*"' - ''; - disabledTestPaths = [ # Requires network access "tests/test_browser.py" @@ -89,6 +90,7 @@ buildPythonPackage rec { meta = with lib; { description = "Headless chrome/chromium automation library (unofficial port of puppeteer)"; homepage = "https://github.com/pyppeteer/pyppeteer"; + changelog = "https://github.com/pyppeteer/pyppeteer/blob/${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ kmein ]; }; From 27804ebd4af145beef37cc18ec392143b493ce56 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Jan 2024 12:24:43 +0100 Subject: [PATCH 2/3] theharvester: relax dependencies --- pkgs/tools/security/theharvester/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/theharvester/default.nix b/pkgs/tools/security/theharvester/default.nix index 9e3d2fcdc4a4..9c806dfb633d 100644 --- a/pkgs/tools/security/theharvester/default.nix +++ b/pkgs/tools/security/theharvester/default.nix @@ -15,6 +15,11 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-tnCiI4bte2RSWSkEL2rwFz6WFjfRMMFiEBOvv3QMyos="; }; + postPatch = '' + # Requirements are pinned + sed -i 's/==.*//' requirements/base.txt + ''; + nativeBuildInputs = with python3.pkgs; [ poetry-core ]; @@ -68,7 +73,7 @@ python3.pkgs.buildPythonApplication rec { ''; homepage = "https://github.com/laramies/theHarvester"; changelog = "https://github.com/laramies/theHarvester/releases/tag/${version}"; - maintainers = with maintainers; [ c0bw3b fab treemo ]; license = licenses.gpl2Only; + maintainers = with maintainers; [ c0bw3b fab treemo ]; }; } From e62550bad0bd89cff09da766d1e2a116bb45566a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Jan 2024 12:25:46 +0100 Subject: [PATCH 3/3] theharvester: add mainProgram --- pkgs/tools/security/theharvester/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/security/theharvester/default.nix b/pkgs/tools/security/theharvester/default.nix index 9c806dfb633d..812b30f0df9a 100644 --- a/pkgs/tools/security/theharvester/default.nix +++ b/pkgs/tools/security/theharvester/default.nix @@ -75,5 +75,6 @@ python3.pkgs.buildPythonApplication rec { changelog = "https://github.com/laramies/theHarvester/releases/tag/${version}"; license = licenses.gpl2Only; maintainers = with maintainers; [ c0bw3b fab treemo ]; + mainProgram = "theHarvester"; }; }