blob: d1893e67e96917a2ad6a4b41c1dab275c98f8b09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
{
fetchFromGitHub,
buildPythonPackage,
rustPlatform,
lib,
pillow,
}:
buildPythonPackage rec {
pname = "copykitten";
version = "2.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Klavionik";
repo = "copykitten";
tag = "v${version}";
hash = "sha256-hjkRVX2+CuLyQw8/1cHRf84qbxPxAnDxCm5gVwdhecs=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-Ujed/3vckHMkYaQ1Euj+KaPG4yeERS7HBbl5SzvbOWE=";
};
build-system = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
dependencies = [
pillow
];
# The tests get/set the contents of the clipboard by running subprocesses.
# On Darwin, the tests try to use `pbcopy`/`pbpaste`, which aren't packaged in Nix.
# On Linux, I tried adding `xclip` to `nativeCheckInputs`, but got errors about
# displays being null and the clipboard never being initialized.
doCheck = false;
pythonImportsCheck = [ "copykitten" ];
meta = {
description = "Robust, dependency-free way to use the system clipboard in Python";
homepage = "https://github.com/Klavionik/copykitten";
changelog = "https://github.com/Klavionik/copykitten/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.samasaur ];
platforms = lib.platforms.all;
};
}
|