summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/op/openapi-tui/package.nix
blob: 87226c89d2eda2a74bb1366a212d576ff3526d40 (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
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  pkg-config,
  oniguruma,
  openssl,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "openapi-tui";
  version = "0.10.2";

  src = fetchFromGitHub {
    owner = "zaghaghi";
    repo = "openapi-tui";
    rev = finalAttrs.version;
    hash = "sha256-rC0lfWZpiiAAShyVDqr1gKTeWmWC+gVp4UmL96Y81mE=";
  };

  cargoHash = "sha256-911ARjYvTNqLVVUWxATbtiKXOC9AqalFvDvp/qAef1Q=";

  # Do not vendor Oniguruma
  env = {
    RUSTONIG_SYSTEM_LIBONIG = true;
    OPENSSL_NO_VENDOR = true;
  };

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

  meta = {
    description = "Terminal UI to list, browse and run APIs defined with openapi spec";
    homepage = "https://github.com/zaghaghi/openapi-tui";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ matthiasbeyer ];
    mainProgram = "openapi-tui";
  };
})