summaryrefslogtreecommitdiff
path: root/packages/stalwart-cli/package.nix
blob: 6c89fa2a2f6b77f4c616afdf8affe226289d56e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
  lib,
  rustPlatform,
  versionCheckHook,
  stalwart,
  fetchFromGitHub,
  openssl,
  pkg-config,
  nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "stalwart-cli"; 
  version = "1.0.7";
  src = fetchFromGitHub {
    owner = "stalwartlabs";
    repo = "cli";
    tag = "v${finalAttrs.version}";
    hash = "";
  };

  cargoHash = "";

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ openssl ];

  env.OPENSSL_NO_VENDOR = true;

  cargoBuildFlags = [
    "--package"
    "stalwart-cli"
  ];
  cargoTestFlags = [
    "--package"
    "stalwart-cli"
  ];

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Stalwart Mail Server CLI";
    mainProgram = "stalwart-cli";
    homepage = "https://github.com/stalwartlabs/cli";
    changelog = "https://github.com/stalwartlabs/cli/blob/main/CHANGELOG.md";
    license = lib.licenses.agpl3Only;
    # maintainers = with lib.maintainers; [
    #   giomf
    # ];
  };
})