![stuebinm](/assets/img/avatar_default.png)
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
52 lines
1.0 KiB
Nix
52 lines
1.0 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, buildPythonPackage
|
|
, pytest
|
|
, pythonOlder
|
|
, xclip
|
|
, xvfb-run
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyclip";
|
|
version = "0.7.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "spyoungtech";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-0nOkNgT8XCwtXI9JZntkhoMspKQU602rTKBFajVKBoM=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace docs/README.md README.md
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
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 = {
|
|
broken = stdenv.isDarwin;
|
|
description = "Cross-platform clipboard utilities supporting both binary and text data";
|
|
mainProgram = "pyclip";
|
|
homepage = "https://github.com/spyoungtech/pyclip";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ mcaju ];
|
|
};
|
|
}
|