forked from mirrors/nixpkgs
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
52 lines
910 B
Nix
52 lines
910 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, coreutils
|
|
, pythonOlder
|
|
, astunparse
|
|
, jq
|
|
, bc
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyp";
|
|
version = "1.0.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hauntsaninja";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "09k7y77h7g4dg0x6lg9pn2ga9z7xiy4vlj15fj0991ffsi4ydqgm";
|
|
};
|
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [
|
|
astunparse
|
|
];
|
|
|
|
preCheck = ''
|
|
export PATH=$out/bin:$PATH
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
coreutils
|
|
jq
|
|
bc
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pyp"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Easily run Python at the shell! Magical, but never mysterious";
|
|
homepage = "https://github.com/hauntsaninja/pyp";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ rmcgibbo ];
|
|
};
|
|
}
|