about summary refs log tree commit diff
path: root/kittybox.nix
blob: 2dd6ee6ffe8fd03f6caed380e5319324d6fb398c (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, typescript
, 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 = [ typescript ] ++ (lib.optional useWebAuthn pkg-config);

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