summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/la/lan-mouse/package.nix
blob: 0c086a58ef8a8e3a526e6a97e3d995dbdd296231 (plain)
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
{
  stdenv,
  rustPlatform,
  fetchFromGitHub,
  lib,
  glib,
  gtk4,
  libadwaita,
  libx11,
  libxtst,
  pkg-config,
  wrapGAppsHook4,
}:

rustPlatform.buildRustPackage rec {
  pname = "lan-mouse";
  version = "0.11.0";

  src = fetchFromGitHub {
    owner = "feschber";
    repo = "lan-mouse";
    rev = "v${version}";
    hash = "sha256-6EqA9WfiukOymUT4FkNdMvzmFKByW0LLoI/9sv4TzBU=";
  };

  nativeBuildInputs = [
    pkg-config
    wrapGAppsHook4
  ];

  buildInputs = [
    glib
    gtk4
    libadwaita
    libx11
    libxtst
  ];

  cargoHash = "sha256-Lxs0qWvNAv4KCeJ+cDBYBzwlbJfQJshcxPRdg9w0szc=";

  postInstall = ''
    install -Dm444 de.feschber.LanMouse.desktop -t $out/share/applications
    install -Dm444 lan-mouse-gtk/resources/de.feschber.LanMouse.svg -t $out/share/icons/hicolor/scalable/apps
  '';

  meta = {
    description = "Software KVM switch for sharing a mouse and keyboard with multiple hosts through the network";
    homepage = "https://github.com/feschber/lan-mouse";
    changelog = "https://github.com/feschber/lan-mouse/releases/tag/v${version}";
    license = lib.licenses.gpl3Only;
    mainProgram = "lan-mouse";
    maintainers = with lib.maintainers; [ pedrohlc ];
    platforms = lib.platforms.unix ++ lib.platforms.windows;
  };
}