nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 71 lines 2.0 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 nixosTests, 5 rustPlatform, 6 fetchNextcloudApp, 7}: 8 9rustPlatform.buildRustPackage rec { 10 pname = "notify_push"; 11 12 # NOTE: make sure this is compatible with all Nextcloud versions 13 # in nixpkgs! 14 # For that, check the `<dependencies>` section of `appinfo/info.xml` 15 # in the app (https://github.com/nextcloud/notify_push/blob/main/appinfo/info.xml) 16 version = "1.3.0"; 17 18 src = fetchFromGitHub { 19 owner = "nextcloud"; 20 repo = "notify_push"; 21 tag = "v${version}"; 22 hash = "sha256-RdrwHlp3VlQkhyYr9XDWzqhNnNmUnd8hVAei8IkkNR8="; 23 }; 24 25 cargoHash = "sha256-+z9XaAzToLZg6/PoRigkvPVpZ/bX/t0VBR5bg3dCUVw="; 26 27 passthru = rec { 28 app = fetchNextcloudApp { 29 appName = "notify_push"; 30 appVersion = version; 31 hash = "sha256-Z9vTAln//DYsx5VLWeJP1KBRF0to79F9aBLnpp+PdwA="; 32 license = "agpl3Plus"; 33 homepage = "https://github.com/nextcloud/notify_push"; 34 url = "https://github.com/nextcloud-releases/notify_push/releases/download/v${version}/notify_push-v${version}.tar.gz"; 35 description = "Push update support for desktop app"; 36 }; 37 38 test_client = rustPlatform.buildRustPackage { 39 pname = "${pname}-test_client"; 40 inherit src version; 41 42 buildAndTestSubdir = "test_client"; 43 44 cargoHash = "sha256-+z9XaAzToLZg6/PoRigkvPVpZ/bX/t0VBR5bg3dCUVw="; 45 46 meta = meta // { 47 mainProgram = "test_client"; 48 }; 49 }; 50 tests = 51 lib.filterAttrs ( 52 key: lib.const (lib.hasPrefix "with-postgresql-and-redis" key) 53 ) nixosTests.nextcloud 54 // { 55 inherit test_client; 56 }; 57 }; 58 59 meta = { 60 changelog = "https://github.com/nextcloud/notify_push/releases/tag/v${version}"; 61 description = "Update notifications for nextcloud clients"; 62 mainProgram = "notify_push"; 63 homepage = "https://github.com/nextcloud/notify_push"; 64 license = lib.licenses.agpl3Plus; 65 platforms = lib.platforms.linux; 66 maintainers = with lib.maintainers; [ 67 das_j 68 helsinki-Jo 69 ]; 70 }; 71}