about summary refs log tree commit diff
path: root/kittybox.nix
blob: 397e0577a54d962ff07ec0733846df531381e79c (plain) (blame)
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
{ stdenv, lib, naersk, lld, mold
, openssl, zlib, pkg-config, protobuf
, useWebAuthn ? false }:

assert useWebAuthn -> openssl != null && pkg-config != null;

naersk.buildPackage {
  pname = "kittybox";
  version = "0.1.0";

  src = ./kittybox-rs;

  doCheck = stdenv.hostPlatform == stdenv.targetPlatform;
  cargoOptions = x: x ++ (lib.optionals useWebAuthn [
    "--no-default-features" "--features=\"webauthn\""
  ]);
  buildInputs = lib.optional useWebAuthn openssl;
  nativeBuildInputs = lib.optional useWebAuthn pkg-config;

  meta = with lib.meta; {
    maintainers = with lib.maintainers; [ vikanezrimaya ];
    platforms = ["aarch64-linux" "x86_64-linux"];
    mainProgram = "kittybox";
  };
}