diff options
Diffstat (limited to 'kittybox.nix')
-rw-r--r-- | kittybox.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/kittybox.nix b/kittybox.nix index e61843b..397e057 100644 --- a/kittybox.nix +++ b/kittybox.nix @@ -1,4 +1,9 @@ -{ stdenv, lib, openssl, zlib, pkg-config, protobuf, naersk, lld, mold }: +{ 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"; @@ -6,6 +11,11 @@ naersk.buildPackage { 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 ]; |