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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
{
lib,
buildGoModule,
fetchFromGitHub,
stdenv,
enableWayland ? stdenv.hostPlatform.isLinux,
enableX11 ? false,
libpng,
libx11,
libxi,
libxkbcommon,
libxtst,
pkg-config,
xclip,
xinput,
xkbcomp,
xkbutils,
xsel,
}:
assert lib.assertMsg (
stdenv.hostPlatform.isLinux -> (lib.xor enableX11 enableWayland)
) "Exactly one of enableWayland, enableX11 must be true";
buildGoModule (finalAttrs: {
pname = "clipse${lib.optionalString enableX11 "-x11"}";
version = "1.2.1";
src = fetchFromGitHub {
owner = "savedra1";
repo = "clipse";
tag = "v${finalAttrs.version}";
hash = "sha256-iDMHEhYuxspBYG54WivnVj2GfMxAc5dcrjNxtAMhsck=";
};
strictDeps = true;
__structuredAttrs = true;
vendorHash = "sha256-LxwST4Zjxq6Fwc47VeOdv19J3g/DHZ7Fywp2ZvVR06I=";
tags =
if stdenv.hostPlatform.isDarwin then
[ "darwin" ]
else if enableWayland then
[ "wayland" ]
else if enableX11 then
[ "linux" ]
else
[ ];
env = {
CGO_ENABLED = if enableX11 || stdenv.hostPlatform.isDarwin then "1" else "0";
};
nativeBuildInputs = lib.optionals enableX11 [
pkg-config
];
buildInputs = lib.optionals enableX11 [
libpng
libx11
libxi
libxkbcommon
libxtst
xclip
xinput
xkbcomp
xkbutils
xsel
];
proxyVendor = true;
meta = {
changelog = "https://github.com/savedra1/clipse/blob/main/CHANGELOG.md";
description = "Useful clipboard manager TUI for Unix";
homepage = "https://github.com/savedra1/clipse";
license = lib.licenses.mit;
mainProgram = "clipse";
maintainers = with lib.maintainers; [
magicquark
savedra1
];
};
})
|