diff options
author | Vika <vika@fireburn.ru> | 2022-09-19 19:01:06 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-09-19 19:01:06 +0300 |
commit | 53c868691a09b84d71f724d23a09d1fb89368792 (patch) | |
tree | e5593882f3c9d4141a2cb796d48dc98b84411d20 /kittybox.nix | |
parent | de105ec7a56752c152e3020fa53a0e13206f4cb4 (diff) | |
download | kittybox-53c868691a09b84d71f724d23a09d1fb89368792.tar.zst |
Make webauthn and openssl optional
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 ]; |