Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkgs/tools/security/vaultwarden/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ in

rustPlatform.buildRustPackage rec {
pname = "vaultwarden";
version = "1.32.7";
version = "1.33.0";

src = fetchFromGitHub {
owner = "dani-garcia";
repo = "vaultwarden";
rev = version;
hash = "sha256-mxZQ1San8zlyvZoBRF9Eb7/mbs374MOgC4baOCFyPoc=";
hash = "sha256-2lZfPPHHAoY12cXpkeJnvMab+C3T5O7KdmVpKqRQkgQ=";
};

useFetchCargoVendor = true;
cargoHash = "sha256-OKfu+G+bS72HJDDLhRp9PMji/baBsh7JaYEZgQYdjTw=";
cargoHash = "sha256-f+884HV9oopvr/2UfWk0sw2DW2cU3c16F+5vGc6+IL0=";

# used for "Server Installed" version in admin panel
env.VW_VERSION = version;
Expand Down
20 changes: 14 additions & 6 deletions pkgs/tools/security/vaultwarden/webvault.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
}:

let
version = "2024.6.2c";
version = "2025.1.1";

suffix = lib.head (lib.match "[0-9.]*([a-z]*)" version);

bw_web_builds = fetchFromGitHub {
owner = "dani-garcia";
repo = "bw_web_builds";
rev = "v${version}";
hash = "sha256-Gd8yQx9j6ieUvaM6IPSELNRy83y0cBkBwLYMqk8OIjU=";
hash = "sha256-wQGpl7N0D83FrrV4T+LFe9h3n5Q/MqLbGGO2F5R9k2g=";
};

in
Expand All @@ -29,10 +29,10 @@ buildNpmPackage rec {
owner = "bitwarden";
repo = "clients";
rev = "web-v${lib.removeSuffix suffix version}";
hash = "sha256-HMQ0oQ04WkLlUgsYt6ZpcziDq05mnSA0+VnJCpteceg=";
hash = "sha256-Bq133V8CsDMnLeaKrW5JmLTGRaZVLRbp+tTgG725tqE=";
};

npmDepsHash = "sha256-zMzQEM5mV14gewzYhy1F2bNEugXjZSOviYwYVV2Cb8c=";
npmDepsHash = "sha256-bWcp3VJI2bObLH/XBx3cdxXQY9Cw+IFpeNA2TXVTtFg=";

postPatch = ''
ln -s ${bw_web_builds}/{patches,resources} ..
Expand All @@ -41,12 +41,20 @@ buildNpmPackage rec {
'';

nativeBuildInputs = [
(python3.withPackages (ps: [ ps.setuptools ]))
python3
];

makeCacheWritable = true;

ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
env = {
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
npm_config_build_from_source = "true";
};

npmRebuildFlags = [
# FIXME one of the esbuild versions fails to download @esbuild/linux-x64
"--ignore-scripts"
];
Comment on lines +54 to +57
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's because it is not in the lockfile. No idea why....

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an optional dependency

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand the lock file format correctly, then it should be in there, too but I could also be wrong


npmBuildScript = "dist:oss:selfhost";

Expand Down