generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buster-client.nix
68 lines (57 loc) · 1.56 KB
/
buster-client.nix
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
{ lib
, buildGoModule
, fetchFromGitHub
, xorg
, libxkbcommon
, libpng
}:
buildGoModule rec {
pname = "buster-client";
version = "0.3.0";
src = fetchFromGitHub {
owner = "dessant";
repo = "buster-client";
rev = "v${version}";
hash = "sha256-tayM4fhxLd52h0ZElumdSCHRWCdOUSqoS7kyzEhVdq8=";
};
# fix: vendor/github.com/robotn/gohook/hook.go:22:10: fatal error: event/goEvent.h: No such file or directory
proxyVendor = true;
vendorHash = "sha256-nw9mRoQzCy2z9xiW0djy7JOWCcyjIXFQAuW/YqQrSDE=";
modRoot = "cmd/client";
ldflags = [
"-s"
"-w"
"-X=main.name=${pname}"
"-X=main.version=${version}"
"-X=main.buildVersion=${version}"
"-X=main.commit=${src.rev}"
"-X=main.date=1970-01-01T00:00:00Z"
];
buildInputs = [
xorg.xorgproto
xorg.libX11
xorg.libXtst
xorg.libXi
libxkbcommon
libpng
];
# the buster-client is not usable from the command line
# so dont install it to $out/bin
# buster-client-setup installs the binary to
# ~/.local/opt/buster/buster-client
binPath = "opt/buster/buster-client";
postInstall = ''
mkdir -p $(dirname $out/${binPath})
mv $out/bin/client $out/${binPath}
rmdir $out/bin
'';
meta = with lib; {
description = "User input simulation for Buster";
homepage = "https://github.com/dessant/buster-client";
changelog = "https://github.com/dessant/buster-client/blob/${src.rev}/CHANGELOG.md";
license = licenses.gpl3Only;
maintainers = with maintainers; [ ];
mainProgram = "buster-client";
platforms = platforms.all;
};
}