2021-09-23 15:35:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, coreutils
|
|
|
|
, pythonOlder
|
|
|
|
, astunparse
|
|
|
|
, jq
|
|
|
|
, bc
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyp";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.0.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2021-09-23 15:35:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hauntsaninja";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "09k7y77h7g4dg0x6lg9pn2ga9z7xiy4vlj15fj0991ffsi4ydqgm";
|
2021-09-23 15:35:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [
|
|
|
|
astunparse
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export PATH=$out/bin:$PATH
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
coreutils
|
|
|
|
jq
|
|
|
|
bc
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyp"
|
|
|
|
];
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
meta = with lib; {
|
2021-12-06 16:07:01 +00:00
|
|
|
description = "Easily run Python at the shell! Magical, but never mysterious";
|
2021-09-23 15:35:13 +00:00
|
|
|
homepage = "https://github.com/hauntsaninja/pyp";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ rmcgibbo ];
|
|
|
|
};
|
|
|
|
}
|