nixos/applications/bitwarden/_bitwarden-directory-connector.nix

53 lines
1.1 KiB
Nix
Raw Normal View History

{
lib,
buildNpmPackage,
fetchgit,
pkgs,
git,
python3,
pkg-config,
libsecret,
nodejs_18,
}: let
buildNpmPackage' = buildNpmPackage.override {nodejs = nodejs_18;};
in
buildNpmPackage' rec {
pname = "bitwarden-directory-connector";
version = "v2023.10.0";
src = fetchgit {
url = "https://github.com/bitwarden/directory-connector.git";
rev = version;
hash = "sha256-5gU7nIPHU94Yhd83C9y0ABL9PbSfMn9WhV2wlpdr2fE=";
};
npmDepsHash = "sha256-jBAWWY12qeX2EDhUvT3TQpnQvYXRsIilRrXGpVzxYvw=";
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
makeCacheWritable = true;
npmBuildScript = "build:cli:prod";
installPhase = ''
mkdir -p $out
cp -R {build-cli,node_modules} $out
'';
buildInputs = [
libsecret
];
nativeBuildInputs = [
git
python3
pkg-config
];
meta = with lib; {
description = "Bitwarden Directory Connector";
homepage = "https://github.com/bitwarden/directory-connector";
license = licenses.gpl3Only;
maintainers = with maintainers; [Silver-Golden];
};
}