mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
f672b32b2e
Diff: https://github.com/dani-garcia/vaultwarden/compare/1.27.0..1.28.0 Changelog: https://github.com/dani-garcia/vaultwarden/releases/tag/1.28.0
50 lines
1.4 KiB
Nix
50 lines
1.4 KiB
Nix
{ lib, stdenv, callPackage, rustPlatform, fetchFromGitHub, fetchurl, nixosTests
|
|
, pkg-config, openssl
|
|
, libiconv, Security, CoreServices
|
|
, dbBackend ? "sqlite", libmysqlclient, postgresql }:
|
|
|
|
let
|
|
webvault = callPackage ./webvault.nix {};
|
|
in
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "vaultwarden";
|
|
version = "1.28.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dani-garcia";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-ML5eblQUk4xMYbBeLxk9tNxi7N4ltrCjMG0oM9zL6JI=";
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = with lib; [ openssl ]
|
|
++ optionals stdenv.isDarwin [ libiconv Security CoreServices ]
|
|
++ optional (dbBackend == "mysql") libmysqlclient
|
|
++ optional (dbBackend == "postgresql") postgresql;
|
|
|
|
# vaultwarden depends on rocket v0.5.0-dev, which requires nightly features.
|
|
# This may be removed if https://github.com/dani-garcia/vaultwarden/issues/712 is fixed.
|
|
RUSTC_BOOTSTRAP = 1;
|
|
|
|
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";
|
|
license = licenses.agpl3Only;
|
|
maintainers = with maintainers; [ msteen ivan ];
|
|
};
|
|
}
|