about summary refs log tree commit diff
path: root/pkgs/by-name/xc/xclicker/package.nix
blob: 5c2e178464f5b3213e38d98ec0b677a4cb6d4b93 (plain) (blame)
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
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, wrapGAppsHook
, gtk3
, libXtst
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "xclicker";
  version = "1.5.1";

  src = fetchFromGitHub {
    owner = "robiot";
    repo = "xclicker";
    rev = "v${finalAttrs.version}";
    hash = "sha256-zVbOfqh21+/41N3FcAFajcZCrQ8iNqedZjgNQO0Zj04=";
  };

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    wrapGAppsHook
  ];

  buildInputs = [
    gtk3
    libXtst
  ];

  mesonBuildType = "release";

  installPhase = ''
    runHook preInstall
    install -Dm755 ./src/xclicker $out/bin/xclicker
    install -Dm644 $src/assets/xclicker.desktop $out/share/applications/xclicker.desktop
    install -Dm644 $src/assets/icon.png $out/share/pixmaps/xclicker.png
    runHook postInstall
  '';

  meta = {
    changelog = "https://github.com/robiot/xclicker/releases/tag/${finalAttrs.src.rev}";
    description = "Fast gui autoclicker for x11 linux desktops";
    homepage = "https://xclicker.xyz/";
    license = lib.licenses.gpl3Only;
    mainProgram = "xclicker";
    maintainers = with lib.maintainers; [ gepbird tomasajt ];
    platforms = lib.platforms.linux;
  };
})