mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 10:14:48 +00:00
I grepped for `fetchCargoVendor` and `inherit (finalAttrs) src;`, and wrote this patch by hand. I tested this with `nix-build --check` on the following attributes, derived from `.meta.position`s that match any of the touched files: * `amberol.cargoDeps.vendorStaging` * `atuin-desktop.cargoDeps.vendorStaging` * `chance.cargoDeps.vendorStaging` * `clapgrep.cargoDeps.vendorStaging` * `cutecosmic.cargoDeps.vendorStaging` * `delineate.cargoDeps.vendorStaging` * `drawpile.cargoDeps.vendorStaging` * `drawpile-server-headless.cargoDeps.vendorStaging` * `field-monitor.cargoDeps.vendorStaging` * `fractal.cargoDeps.vendorStaging` * `geopard.cargoDeps.vendorStaging` * `git-cinnabar.cargoDeps.vendorStaging` * `gnome-robots.cargoDeps.vendorStaging` * `insulator2.cargoDeps.vendorStaging` * `kana.cargoDeps.vendorStaging` * `key-rack.cargoDeps.vendorStaging` * `kime.cargoDeps.vendorStaging` * `krunkit.cargoDeps.vendorStaging` * `krunvm.cargoDeps.vendorStaging` * `ladybird.cargoDeps.vendorStaging` * `libchewing.cargoDeps.vendorStaging` * `loupe.cargoDeps.vendorStaging` * `metronome.cargoDeps.vendorStaging` * `pdns-recursor.cargoDeps.vendorStaging` * `python314Packages.copykitten.cargoDeps.vendorStaging` * `python314Packages.django-vcache.cargoDeps.vendorStaging` * `python314Packages.pdoc-pyo3-sample-library.cargoDeps.vendorStaging` * `python314Packages.pycambia.cargoDeps.vendorStaging` * `python314Packages.python-kadmin-rs.cargoDeps.vendorStaging` * `python314Packages.tlparse.cargoDeps.vendorStaging` * `python313Packages.copykitten.cargoDeps.vendorStaging` * `python313Packages.django-vcache.cargoDeps.vendorStaging` * `python313Packages.pdoc-pyo3-sample-library.cargoDeps.vendorStaging` * `python313Packages.pycambia.cargoDeps.vendorStaging` * `python313Packages.python-kadmin-rs.cargoDeps.vendorStaging` * `python313Packages.tlparse.cargoDeps.vendorStaging` * `share-preview.cargoDeps.vendorStaging` * `stratisd.cargoDeps.vendorStaging` * `taskwarrior3.cargoDeps.vendorStaging` * `tsukimi.cargoDeps.vendorStaging` * `wildcard.cargoDeps.vendorStaging`
52 lines
1.4 KiB
Nix
52 lines
1.4 KiB
Nix
{
|
|
fetchFromGitHub,
|
|
buildPythonPackage,
|
|
rustPlatform,
|
|
lib,
|
|
pillow,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "copykitten";
|
|
version = "2.0.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Klavionik";
|
|
repo = "copykitten";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-hjkRVX2+CuLyQw8/1cHRf84qbxPxAnDxCm5gVwdhecs=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit (finalAttrs) pname version 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${finalAttrs.version}/CHANGELOG.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ lib.maintainers.samasaur ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
})
|