From 024ad092fe9e9fd2d2c3d847c8f7074eef0cb77c Mon Sep 17 00:00:00 2001 From: Harinn Date: Thu, 2 Jul 2026 14:05:21 +0700 Subject: [PATCH] python3Packages.shodan: modernize --- pkgs/development/python-modules/shodan/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/shodan/default.nix b/pkgs/development/python-modules/shodan/default.nix index e326b57639fb..908f9cb25171 100644 --- a/pkgs/development/python-modules/shodan/default.nix +++ b/pkgs/development/python-modules/shodan/default.nix @@ -10,13 +10,16 @@ xlsxwriter, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "shodan"; version = "1.31.0"; pyproject = true; + __structuredAttrs = true; + src = fetchPypi { - inherit pname version; + pname = "shodan"; + inherit (finalAttrs) version; hash = "sha256-xzJ1OG6gI5DhlsNcZgcGoo3U1TfFoh6zh6tiNvrCUfY="; }; @@ -40,11 +43,11 @@ buildPythonPackage rec { description = "Python library and command-line utility for Shodan"; mainProgram = "shodan"; homepage = "https://github.com/achillean/shodan-python"; - changelog = "https://github.com/achillean/shodan-python/blob/${version}/CHANGELOG.md"; + changelog = "https://github.com/achillean/shodan-python/blob/${finalAttrs.version}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab lihop ]; }; -} +})