pkgs/vaultwarden: init at git-a2ad1dc
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m24s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m24s
This commit is contained in:
65
pkgs/vaultwarden/package.nix
Normal file
65
pkgs/vaultwarden/package.nix
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
callPackage,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
nixosTests,
|
||||
pkg-config,
|
||||
openssl,
|
||||
libiconv,
|
||||
dbBackend ? "sqlite",
|
||||
libmysqlclient,
|
||||
libpq,
|
||||
}:
|
||||
|
||||
let
|
||||
webvault = callPackage ./webvault.nix { };
|
||||
in
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "vaultwarden";
|
||||
version = "git-" + builtins.substring 0 7 src.rev;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dani-garcia";
|
||||
repo = "vaultwarden";
|
||||
rev = "a2ad1dc7c3d28834749d4b14206838d795236c27";
|
||||
sha256 = "sha256-6Qmp/Uv8hdKuL9e3tPMKgNq1ZdvRQbzM65ifmS2Z3UY=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-F7we9rurJ7srz54lsuSrdoIZpkGE+4ncW3+wjEwaD7M=";
|
||||
|
||||
# used for "Server Installed" version in admin panel
|
||||
env.VW_VERSION = version;
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
openssl
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libiconv
|
||||
]
|
||||
++ lib.optional (dbBackend == "mysql") libmysqlclient
|
||||
++ lib.optional (dbBackend == "postgresql") libpq;
|
||||
|
||||
buildFeatures = dbBackend;
|
||||
|
||||
passthru = {
|
||||
inherit webvault;
|
||||
tests = nixosTests.vaultwarden;
|
||||
updateScript = callPackage ./update.nix { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Unofficial Bitwarden compatible server written in Rust";
|
||||
homepage = "https://github.com/dani-garcia/vaultwarden";
|
||||
changelog = "https://github.com/dani-garcia/vaultwarden/releases/tag/${version}";
|
||||
license = licenses.agpl3Only;
|
||||
maintainers = with maintainers; [
|
||||
dotlambda
|
||||
SuperSandro2000
|
||||
];
|
||||
mainProgram = "vaultwarden";
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user