nixpkgs/pkgs/development/python-modules/pyp/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
904 B
Nix
Raw Normal View History

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