Merge pull request #144031 from CajuM/pyclip

This commit is contained in:
Sandro 2021-11-01 21:37:23 +01:00 committed by GitHub
commit fd70eae72f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,40 @@
{ lib
, stdenv
, fetchFromGitHub
, buildPythonPackage
, pytest
, xclip
, xvfb-run
}:
buildPythonPackage rec {
pname = "pyclip";
version = "0.5.4";
src = fetchFromGitHub {
owner = "spyoungtech";
repo = pname;
rev = "v${version}";
sha256 = "19ff9cgnfx03mbmy5zpbdi986ppx38a5jf97vkqnic4g5sd1qyrn";
};
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 ];
};
}

View file

@ -6182,6 +6182,8 @@ in {
pyclimacell = callPackage ../development/python-modules/pyclimacell { };
pyclip = callPackage ../development/python-modules/pyclip { };
pyclipper = callPackage ../development/python-modules/pyclipper { };
pycm = callPackage ../development/python-modules/pycm { };