Merge pull request #138998 from rmcgibbo/pyp
commitdc2cebde006c6b7f26565cee9f8aaf4e55ba56fb
authorSandro <sandro.jaeckel@gmail.com>
dateWed 22 Sep 2021, 22:19 (5 years ago)
parentb7da9680a192fa
pkgs/development/python-modules/pyp/default.nixnew file+43
@@ -0,0 +1,43 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pytestCheckHook
5+, coreutils
6+, pythonOlder
7+, astunparse
8+, jq
9+, bc
10+}:
11+
12+buildPythonPackage rec {
13+ pname = "pyp";
14+ version = "0.3.4";
15+
16+ src = fetchFromGitHub {
17+ owner = "hauntsaninja";
18+ repo = pname;
19+ rev = "v${version}";
20+ sha256 = "sha256-K9dGmvy4siurmhqwNfg1dT0TWc6tCSaxfPyaJkYM2Vw=";
21+ };
22+
23+ propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [
24+ astunparse
25+ ];
26+
27+ preCheck = ''
28+ export PATH=$out/bin:$PATH
29+ '';
30+ checkInputs = [
31+ pytestCheckHook
32+ coreutils
33+ jq
34+ bc
35+ ];
36+
37+ meta = with lib; {
38+ description = "Easily run Python at the shell! Magical, but never mysterious.";
39+ homepage = "https://github.com/hauntsaninja/pyp";
40+ license = licenses.mit;
41+ maintainers = with maintainers; [ rmcgibbo ];
42+ };
43+}
pkgs/top-level/python-packages.nix+4
@@ -6551,6 +6551,10 @@ in {
65516551
65526552 pyomo = callPackage ../development/python-modules/pyomo { };
65536553
6554+ pyp = callPackage ../development/python-modules/pyp {
6555+ inherit (pkgs) jq;
6556+ };
6557+
65546558 phonemizer = callPackage ../development/python-modules/phonemizer { };
65556559
65566560 pyopencl = callPackage ../development/python-modules/pyopencl {