1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 openssl,
7 sqlite,
8 nixosTests,
9}:
10
11rustPlatform.buildRustPackage rec {
12 pname = "mollysocket";
13 version = "1.6.0";
14
15 src = fetchFromGitHub {
16 owner = "mollyim";
17 repo = "mollysocket";
18 tag = version;
19 hash = "sha256-F80XRQn3h1Y6dE8PVLGMTY29yZomrwqFAsm7h8euHw8=";
20 };
21
22 cargoHash = "sha256-BgmgxNxyuEXKLO9yoymJ0PUfL6/YSegGk8OMPjup/zo=";
23
24 nativeBuildInputs = [
25 pkg-config
26 ];
27
28 buildInputs = [
29 openssl
30 sqlite
31 ];
32
33 checkFlags = [
34 # tests interact with Signal servers
35 "--skip=config::tests::check_wildcard_endpoint"
36 "--skip=utils::post_allowed::tests::test_allowed"
37 "--skip=utils::post_allowed::tests::test_not_allowed"
38 "--skip=utils::post_allowed::tests::test_post"
39 "--skip=ws::tls::tests::connect_untrusted_server"
40 "--skip=ws::tls::tests::connect_trusted_server"
41 ];
42
43 passthru.tests = {
44 inherit (nixosTests) mollysocket;
45 };
46
47 meta = {
48 changelog = "https://github.com/mollyim/mollysocket/releases/tag/${version}";
49 description = "Get Signal notifications via UnifiedPush";
50 homepage = "https://github.com/mollyim/mollysocket";
51 license = lib.licenses.agpl3Plus;
52 mainProgram = "mollysocket";
53 maintainers = with lib.maintainers; [ dotlambda ];
54 };
55}