xtf: 0-unstable-2024-09-13 -> 0-unstable-2024-11-01 (#360673)
[NixPkgs.git] / pkgs / servers / nextcloud / notify_push.nix
blobc84f17086b2c592c5ae6f25b91a8980f5d3357e6
1 { lib
2 , fetchFromGitHub
3 , nixosTests
4 , rustPlatform
5 }:
7 rustPlatform.buildRustPackage rec {
8   pname = "notify_push";
9   version = "0.7.0";
11   src = fetchFromGitHub {
12     owner = "nextcloud";
13     repo = pname;
14     rev = "v${version}";
15     hash = "sha256-QHVWiH6qkwQay0wffoyDUyVxgxzNp10ieYIsdqoEdCM=";
16   };
18   cargoHash = "sha256-HwE/ql8rJcGIINy+hNnpaTFEJqbmuUDrIvVI8kCpfQ8=";
20   passthru = rec {
21     test_client = rustPlatform.buildRustPackage {
22       pname = "${pname}-test_client";
23       inherit src version;
25       buildAndTestSubdir = "test_client";
27       cargoHash = "sha256-KybnPzCM9mLF55s5eZ3qr5GRcaaYFpEdNklWEo/72Ts=";
29       meta = meta // {
30         mainProgram = "test_client";
31       };
32     };
33     tests =
34       lib.filterAttrs
35         (key: lib.const (lib.hasPrefix "with-postgresql-and-redis" key))
36         nixosTests.nextcloud
37       // {
38         inherit test_client;
39       };
40   };
42   meta = with lib; {
43     changelog = "https://github.com/nextcloud/notify_push/releases/tag/v${version}";
44     description = "Update notifications for nextcloud clients";
45     mainProgram = "notify_push";
46     homepage = "https://github.com/nextcloud/notify_push";
47     license = licenses.agpl3Plus;
48     platforms = platforms.linux;
49     maintainers = teams.helsinki-systems.members;
50   };