tuicam: init at 0.0.2 (#377825)
[NixPkgs.git] / pkgs / by-name / la / lan-mouse / package.nix
bloba32cc9cc4956f3356111731b55841f83f4d86299
2   stdenv,
3   rustPlatform,
4   fetchFromGitHub,
5   lib,
6   glib,
7   gtk4,
8   libadwaita,
9   libX11,
10   libXtst,
11   pkg-config,
12   wrapGAppsHook4,
15 rustPlatform.buildRustPackage rec {
16   pname = "lan-mouse";
17   version = "0.10.0";
19   src = fetchFromGitHub {
20     owner = "feschber";
21     repo = "lan-mouse";
22     rev = "v${version}";
23     hash = "sha256-ofiNgJbmf35pfRvZB3ZmMkCJuM7yYgNL+Dd5mZZqyNk=";
24   };
26   # lan-mouse uses `git` to determine the version at build time and
27   # has Cargo set the `GIT_DESCRIBE` environment variable. To improve
28   # build reproducibility, we define the variable based on the package
29   # version instead.
30   prePatch = ''
31     rm build.rs
32   '';
33   env = {
34     GIT_DESCRIBE = "${version}-nixpkgs";
35   };
37   nativeBuildInputs = [
38     pkg-config
39     wrapGAppsHook4
40   ];
42   buildInputs = [
43     glib
44     gtk4
45     libadwaita
46     libX11
47     libXtst
48   ];
50   useFetchCargoVendor = true;
51   cargoHash = "sha256-+UXRBYfbkb114mwDGj36oG5ZT3TQtcEzsbyZvtWTMxM=";
53   meta = {
54     description = "Software KVM switch for sharing a mouse and keyboard with multiple hosts through the network";
55     homepage = "https://github.com/feschber/lan-mouse";
56     changelog = "https://github.com/feschber/lan-mouse/releases/tag/v${version}";
57     license = lib.licenses.gpl3Only;
58     mainProgram = "lan-mouse";
59     maintainers = with lib.maintainers; [ pedrohlc ];
60     platforms = lib.platforms.unix ++ lib.platforms.windows;
61   };