From e8d270b76226bfc0f5b4807eaa78a854ee08cd2d Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 22 Jul 2023 15:16:32 -0300 Subject: [PATCH] pyp: init at 1.1.0 --- pkgs/tools/text/pyp/default.nix | 47 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 49 insertions(+) create mode 100644 pkgs/tools/text/pyp/default.nix diff --git a/pkgs/tools/text/pyp/default.nix b/pkgs/tools/text/pyp/default.nix new file mode 100644 index 000000000000000..2c1e52a872a643d --- /dev/null +++ b/pkgs/tools/text/pyp/default.nix @@ -0,0 +1,47 @@ +{ lib +, fetchFromGitHub +, python3 +, bc +, jq +}: + +let + version = "1.1.0"; +in python3.pkgs.buildPythonApplication { + pname = "pyp"; + inherit version; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "hauntsaninja"; + repo = "pyp"; + rev = "v${version}"; + hash = "sha256-A1Ip41kxH17BakHEWEuymfa24eBEl5FIHAWL+iZFM4I="; + }; + + nativeBuildInputs = [ + python3.pkgs.flit-core + ]; + + nativeCheckInputs = [ + python3.pkgs.pytest + bc + jq + ]; + + checkPhase = '' + runHook preCheck + + PATH=$out/bin:$PATH pytest + + runHook postCheck + ''; + + meta = { + homepage = "https://github.com/hauntsaninja/pyp"; + description = "Easily run Python at the shell"; + changelog = "https://github.com/hauntsaninja/pyp/blob/${version}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ AndersonTorres ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cfcb5541281eccb..42b5d37110209a3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24191,6 +24191,8 @@ with pkgs; buildPythonApplication click future six; }; + pyp = callPackage ../tools/text/pyp { }; + pru = callPackage ../tools/text/pru { }; prospector = callPackage ../development/tools/prospector { };