From d660adc963f340df05f506507457752a491aaffa Mon Sep 17 00:00:00 2001 From: RRvW Date: Thu, 7 Dec 2023 00:14:17 +0100 Subject: [PATCH] vaultwarden: Add VW_VERSION env to fix version detection At build time, vaultwarden looks at the VW_VERSION env variable to embed it's own version string. When this is unset, it still compiles, but responds with "null" as version info under `/api/config`, which leads to issues like https://github.com/dani-garcia/vaultwarden/discussions/3996 Under Nix, this variable is unset, so this commit properly forces it --- pkgs/tools/security/vaultwarden/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/security/vaultwarden/default.nix b/pkgs/tools/security/vaultwarden/default.nix index 19dd26b0b3fa..2497fca81f46 100644 --- a/pkgs/tools/security/vaultwarden/default.nix +++ b/pkgs/tools/security/vaultwarden/default.nix @@ -11,6 +11,10 @@ rustPlatform.buildRustPackage rec { pname = "vaultwarden"; version = "1.28.1"; + # the build step requires this env variable to figure out the version + # if this is unset, the server will respond with "null" as version, which crashes newer mobile clients + VW_VERSION = version; + src = fetchFromGitHub { owner = "dani-garcia"; repo = pname;