My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/pyclip/default.nix

49 lines
1000 B

{ lib
, stdenv
, fetchFromGitHub
, buildPythonPackage
, pytest
, pythonOlder
, xclip
, xvfb-run
}:
buildPythonPackage rec {
pname = "pyclip";
version = "0.6.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "spyoungtech";
repo = pname;
rev = "v${version}";
hash = "sha256-NCWmCp4VGwwvubqN8FUUJ0kcZbXjOEyB6+BfGky1Kj4=";
};
postPatch = ''
substituteInPlace setup.py \
--replace docs/README.md README.md
'';
checkInputs = [
pytest
] ++ lib.optionals stdenv.isLinux [
xclip
xvfb-run
];
checkPhase = ''
runHook preCheck
${lib.optionalString stdenv.isLinux "xvfb-run -s '-screen 0 800x600x24'"} pytest tests
runHook postCheck
'';
meta = with lib; {
description = "Cross-platform clipboard utilities supporting both binary and text data";
homepage = "https://github.com/spyoungtech/pyclip";
license = licenses.asl20;
maintainers = with maintainers; [ mcaju ];
};
}