Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitwarden-desktop: add aarch64-linux support #351355

Merged
merged 1 commit into from
Oct 27, 2024
Merged
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
13 changes: 10 additions & 3 deletions pkgs/by-name/bi/bitwarden-desktop/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@
, runCommand
, rustc
, rustPlatform
, stdenv
}:

let
description = "Secure and free password manager for all of your devices";
icon = "bitwarden";
electron = electron_32;

bitwardenDesktopNativeArch = {
aarch64 = "arm64";
x86_64 = "x64";
}.${stdenv.hostPlatform.parsed.cpu.name} or (throw "bitwarden-desktop: unsupported CPU family ${stdenv.hostPlatform.parsed.cpu.name}");

in buildNpmPackage rec {
pname = "bitwarden-desktop";
version = "2024.9.0";
Expand Down Expand Up @@ -122,7 +129,7 @@ in buildNpmPackage rec {
pushd apps/desktop

# desktop_native/index.js loads a file of that name regarldess of the libc being used
mv desktop_native/napi/desktop_napi.* desktop_native/napi/desktop_napi.linux-x64-musl.node
mv desktop_native/napi/desktop_napi.* desktop_native/napi/desktop_napi.linux-${bitwardenDesktopNativeArch}-musl.node

npm exec electron-builder -- \
--dir \
Expand Down Expand Up @@ -163,7 +170,7 @@ in buildNpmPackage rec {

mkdir $out

pushd apps/desktop/dist/linux-unpacked
pushd apps/desktop/dist/linux-${lib.optionalString stdenv.isAarch64 "arm64-"}unpacked
mkdir -p $out/opt/Bitwarden
cp -r locales resources{,.pak} $out/opt/Bitwarden
popd
Expand Down Expand Up @@ -208,7 +215,7 @@ in buildNpmPackage rec {
homepage = "https://bitwarden.com";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ amarshall ];
platforms = [ "x86_64-linux" ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
mainProgram = "bitwarden";
};
}