From 80df9ff90d35bed552946fbe1d4ff8a6cdc28765 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Fri, 18 Nov 2022 16:31:49 +0100 Subject: [PATCH] nextcloud-notify-push: init at 0.5.0 --- pkgs/servers/nextcloud/notify_push.nix | 41 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 pkgs/servers/nextcloud/notify_push.nix diff --git a/pkgs/servers/nextcloud/notify_push.nix b/pkgs/servers/nextcloud/notify_push.nix new file mode 100644 index 000000000000..737e5d7debaa --- /dev/null +++ b/pkgs/servers/nextcloud/notify_push.nix @@ -0,0 +1,41 @@ +{ lib, fetchFromGitHub, fetchpatch, rustPlatform }: + +rustPlatform.buildRustPackage rec { + pname = "notify_push"; + version = "0.5.0"; + + src = fetchFromGitHub { + owner = "nextcloud"; + repo = pname; + rev = "v${version}"; + hash = "sha256-LkC2mD3klMQRF3z5QuVPcRHzz33VJP+UcN6LxsQXq7Q="; + }; + + cargoHash = "sha256-GZikXM3AvhC2gtwE2wYbGV+aRV+QKothWQG17Vzi2Lc="; + + passthru = { + test_client = rustPlatform.buildRustPackage { + pname = "${pname}-test_client"; + inherit src version; + + cargoPatches = [ + # fix test client not being able to connect + (fetchpatch { + url = "https://github.com/nextcloud/notify_push/commit/03aa38d917bfcba4d07f72b6aedac6a5057cad81.patch"; + hash = "sha256-dcN62tA05HH1RTvG0puonJjKMQn1EouA8iuz82vh2aU="; + }) + ]; + + buildAndTestSubdir = "test_client"; + + cargoHash = "sha256-RALqjI6DlWmfgKvyaH4RiSyqWsIqUyY9f709hOi2ldc="; + }; + }; + + meta = with lib; { + description = "Update notifications for nextcloud clients"; + homepage = "https://github.com/nextcloud/notify_push"; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ ajs124 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 42895e8977ad..d966dfd8f167 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10128,6 +10128,8 @@ with pkgs; nextcloud-news-updater = callPackage ../servers/nextcloud/news-updater.nix { }; + nextcloud-notify_push = callPackage ../servers/nextcloud/notify_push.nix { }; + ndstool = callPackage ../tools/archivers/ndstool { }; nfs-ganesha = callPackage ../servers/nfs-ganesha { };