From 80b0785e2e55f663e057e7b719613687f2ca6acb Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 28 Jun 2026 15:46:33 +0000 Subject: [PATCH] pyp: cleanup --- pkgs/by-name/py/pyp/package.nix | 83 ++++++++++++++++----------------- 1 file changed, 39 insertions(+), 44 deletions(-) diff --git a/pkgs/by-name/py/pyp/package.nix b/pkgs/by-name/py/pyp/package.nix index 0822f93a9d43..6d0a126f84c1 100644 --- a/pkgs/by-name/py/pyp/package.nix +++ b/pkgs/by-name/py/pyp/package.nix @@ -10,49 +10,44 @@ versionCheckHook, }: -let - finalAttrs = { - pname = "pyp"; - version = "1.3.0"; +python3Packages.buildPythonApplication (finalAttrs: { + pname = "pyp"; + version = "1.3.0"; + pyproject = true; + __structuredAttrs = true; - src = fetchFromGitHub { - owner = "hauntsaninja"; - repo = "pyp"; - tag = "v${finalAttrs.version}"; - hash = "sha256-u9yxjYNQrtYtFtUh5tTJ1mGmGB+Ry+FRupli8RzRu3c="; - }; - - pyproject = true; - - build-system = with python3Packages; [ - flit-core - ]; - - nativeCheckInputs = - (with python3Packages; [ - pytestCheckHook - ]) - ++ [ - addBinToPathHook - bc - jq - versionCheckHook - ]; - - pythonImportsCheck = [ - "pyp" - ]; - - meta = { - homepage = "https://github.com/hauntsaninja/pyp"; - description = "Easily run Python at the shell"; - changelog = "https://github.com/hauntsaninja/pyp/blob/${finalAttrs.version}/CHANGELOG.md"; - license = with lib.licenses; [ mit ]; - mainProgram = "pyp"; - maintainers = with lib.maintainers; [ - rmcgibbo - ]; - }; + src = fetchFromGitHub { + owner = "hauntsaninja"; + repo = "pyp"; + tag = "v${finalAttrs.version}"; + hash = "sha256-u9yxjYNQrtYtFtUh5tTJ1mGmGB+Ry+FRupli8RzRu3c="; }; -in -python3Packages.buildPythonPackage finalAttrs + + build-system = with python3Packages; [ + flit-core + ]; + + nativeCheckInputs = + (with python3Packages; [ + pytestCheckHook + ]) + ++ [ + addBinToPathHook + bc + jq + versionCheckHook + ]; + + pythonImportsCheck = [ "pyp" ]; + + meta = { + homepage = "https://github.com/hauntsaninja/pyp"; + description = "Easily run Python at the shell"; + changelog = "https://github.com/hauntsaninja/pyp/blob/${finalAttrs.version}/CHANGELOG.md"; + license = with lib.licenses; [ mit ]; + mainProgram = "pyp"; + maintainers = with lib.maintainers; [ + rmcgibbo + ]; + }; +})