python3Packages.pyclip: disable on older Python releases

This commit is contained in:
Fabian Affolter 2022-03-19 10:37:10 +01:00 committed by GitHub
parent ebb9d7c55a
commit 1f60c6334e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@
, fetchFromGitHub
, buildPythonPackage
, pytest
, pythonOlder
, xclip
, xvfb-run
}:
@ -10,12 +11,15 @@
buildPythonPackage rec {
pname = "pyclip";
version = "0.6.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "spyoungtech";
repo = pname;
rev = "v${version}";
sha256 = "sha256-NCWmCp4VGwwvubqN8FUUJ0kcZbXjOEyB6+BfGky1Kj4=";
hash = "sha256-NCWmCp4VGwwvubqN8FUUJ0kcZbXjOEyB6+BfGky1Kj4=";
};
postPatch = ''
@ -23,7 +27,12 @@ buildPythonPackage rec {
--replace docs/README.md README.md
'';
checkInputs = [ pytest ] ++ lib.optionals stdenv.isLinux [ xclip xvfb-run ];
checkInputs = [
pytest
] ++ lib.optionals stdenv.isLinux [
xclip
xvfb-run
];
checkPhase = ''
runHook preCheck