biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / misc / watchmate / default.nix
blobeebcc3cce01187748921fd62be54620d4158793d
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   pkg-config,
6   gtk4,
7   libadwaita,
8   bluez,
9   dbus,
10   openssl,
11   wrapGAppsHook4,
12   glib,
13 }: let
14   releaseVersion = "0.5.2";
16   rustPlatform.buildRustPackage rec {
17     pname = "watchmate";
18     version = "${releaseVersion}-unstable-2024-08-13";
20     src = fetchFromGitHub {
21       owner = "azymohliad";
22       repo = "watchmate";
23       rev = "e05edfae94a1973110c6f40f25133d5979f485ab";
24       hash = "sha256-fHWxn7hFx/9cnLlCHIC6hIJaLd1U3Ii9mJgTJ+Hw63M=";
25     };
27     cargoLock = {
28       lockFile = ./Cargo.lock;
29       outputHashes = {
30         "mpris2-zbus-0.1.0" = "sha256-a/cvbB0M9cUd8RP5XxgHRbJ/i/UKAEK4DTwwUU69IuY=";
31       };
32     };
34     nativeBuildInputs = [
35       pkg-config
36       wrapGAppsHook4
37       glib
38     ];
40     buildInputs = [
41       gtk4
42       libadwaita
43       bluez
44       dbus
45       openssl
46     ];
48     postInstall = ''
49       install -Dm444 assets/io.gitlab.azymohliad.WatchMate.desktop -t $out/share/applications/
50       install -Dm444 assets/io.gitlab.azymohliad.WatchMate.metainfo.xml -t $out/share/metainfo/
51       install -Dm444 assets/io.gitlab.azymohliad.WatchMate.gschema.xml -t $out/share/glib-2.0/schemas/
52       glib-compile-schemas $out/share/glib-2.0/schemas/
53       install -Dm444 assets/icons/io.gitlab.azymohliad.WatchMate.svg -t $out/share/icons/hicolor/scalable/apps/
54       install -Dm444 assets/icons/io.gitlab.azymohliad.WatchMate-symbolic.svg -t $out/share/icons/hicolor/scalable/apps/
55     '';
57     meta = with lib; {
58       description = "PineTime smart watch companion app for Linux phone and desktop";
59       mainProgram = "watchmate";
60       homepage = "https://github.com/azymohliad/watchmate";
61       changelog = "https://github.com/azymohliad/watchmate/raw/v${releaseVersion}/CHANGELOG.md";
62       license = licenses.gpl3Plus;
63       maintainers = with maintainers; [chuangzhu];
64       platforms = platforms.linux;
65     };
66   }