Files
nixpkgs/pkgs/development/python-modules/copykitten/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

52 lines
1.3 KiB
Nix

{
fetchFromGitHub,
buildPythonPackage,
rustPlatform,
lib,
pillow,
}:
buildPythonPackage rec {
pname = "copykitten";
version = "1.2.3";
pyproject = true;
src = fetchFromGitHub {
owner = "Klavionik";
repo = "copykitten";
tag = "v${version}";
hash = "sha256-S4IPVhYk/o15LQK1AB8VpdrHwIwTZyvmI2+e27/vDLs=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-kWhZzX/OI+05rvVFD+lOFvpKbNH/gMROFufcCzYDyko=";
};
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;
};
}