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 , fetchFromGitHub
, buildPythonPackage , buildPythonPackage
, pytest , pytest
, pythonOlder
, xclip , xclip
, xvfb-run , xvfb-run
}: }:
@ -10,12 +11,15 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyclip"; pname = "pyclip";
version = "0.6.0"; version = "0.6.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "spyoungtech"; owner = "spyoungtech";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-NCWmCp4VGwwvubqN8FUUJ0kcZbXjOEyB6+BfGky1Kj4="; hash = "sha256-NCWmCp4VGwwvubqN8FUUJ0kcZbXjOEyB6+BfGky1Kj4=";
}; };
postPatch = '' postPatch = ''
@ -23,7 +27,12 @@ buildPythonPackage rec {
--replace docs/README.md README.md --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 = '' checkPhase = ''
runHook preCheck runHook preCheck