3
0
Fork 0
forked from mirrors/nixpkgs
Robert Schütz 2023-03-27 19:44:49 -07:00
parent 4361baa782
commit f672b32b2e
5 changed files with 870 additions and 629 deletions

View file

@ -121,6 +121,8 @@ let
driver.find_element(By.CSS_SELECTOR, 'input#register-form_input_confirm-master-password').send_keys(
'${userPassword}'
)
if driver.find_element(By.CSS_SELECTOR, 'input#checkForBreaches').is_selected():
driver.find_element(By.CSS_SELECTOR, 'input#checkForBreaches').click()
driver.find_element(By.XPATH, "//button[contains(., 'Create account')]").click()
@ -133,9 +135,9 @@ let
)
driver.find_element(By.XPATH, "//button[contains(., 'Log in')]").click()
wait.until(EC.title_contains("Vaultwarden Web Vault"))
wait.until(EC.title_contains("Vaults"))
driver.find_element(By.XPATH, "//button[contains(., 'Add item')]").click()
driver.find_element(By.XPATH, "//button[contains(., 'New item')]").click()
driver.find_element(By.CSS_SELECTOR, 'input#name').send_keys(
'secrets'

File diff suppressed because it is too large Load diff

View file

@ -9,20 +9,17 @@ in
rustPlatform.buildRustPackage rec {
pname = "vaultwarden";
version = "1.27.0";
version = "1.28.0";
src = fetchFromGitHub {
owner = "dani-garcia";
repo = pname;
rev = version;
hash = "sha256-QvU1Y3syr6PZbTRebbZF4sEzI4lIj1enJe2F/gGfvQM=";
hash = "sha256-ML5eblQUk4xMYbBeLxk9tNxi7N4ltrCjMG0oM9zL6JI=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"multer-2.0.4" = "sha256-962onbcPUjkoIGSQTnF8m1fkamwThpPj4uBJ8EqbouQ=";
};
};
nativeBuildInputs = [ pkg-config ];
@ -46,7 +43,7 @@ rustPlatform.buildRustPackage rec {
meta = with lib; {
description = "Unofficial Bitwarden compatible server written in Rust";
homepage = "https://github.com/dani-garcia/vaultwarden";
license = licenses.gpl3Only;
license = licenses.agpl3Only;
maintainers = with maintainers; [ msteen ivan ];
};
}

View file

@ -20,10 +20,8 @@ writeShellScript "update-vaultwarden" ''
URL="https://raw.githubusercontent.com/dani-garcia/vaultwarden/''${VAULTWARDEN_VERSION}/docker/Dockerfile.j2"
WEBVAULT_VERSION=$(curl --silent "$URL" | grep "set vault_version" | sed -E "s/.*\"v([^\"]+)\".*/\\1/")
old_hash_bw=$(nix --extra-experimental-features nix-command eval -f default.nix --raw vaultwarden.webvault.src.outputHash)
old_hash_vw=$(nix --extra-experimental-features nix-command eval -f default.nix --raw vaultwarden.webvault.bw_web_builds.outputHash)
new_hash_bw=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-git https://github.com/bitwarden/clients.git --rev "web-v$WEBVAULT_VERSION" | jq --raw-output ".sha256"))
new_hash_vw=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-git https://github.com/dani-garcia/bw_web_builds.git --rev "v$WEBVAULT_VERSION" | jq --raw-output ".sha256"))
sed -e "s#$old_hash_bw#$new_hash_bw#" -e "s#$old_hash_vw#$new_hash_vw#" -i pkgs/tools/security/vaultwarden/webvault.nix
old_hash=$(nix --extra-experimental-features nix-command eval -f default.nix --raw vaultwarden.webvault.bw_web_builds.outputHash)
new_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-git https://github.com/dani-garcia/bw_web_builds.git --rev "v$WEBVAULT_VERSION" | jq --raw-output ".sha256"))
sed -e "s#$old_hash#$new_hash#" -i pkgs/tools/security/vaultwarden/webvault.nix
nix-update "vaultwarden.webvault" --version "$WEBVAULT_VERSION"
''

View file

@ -10,30 +10,30 @@
let
buildNpmPackage' = buildNpmPackage.override { nodejs = nodejs-16_x; };
version = "2022.12.0";
version = "2023.3.0b";
bw_web_builds = fetchFromGitHub {
owner = "dani-garcia";
repo = "bw_web_builds";
rev = "v${version}";
hash = "sha256-4yUE0ySUCKmmbca+T8qjqSO0AHZEUAHZ4nheRjpDnZo=";
hash = "sha256-3kCgT+NsYU7sRJvw56vcPXS7j+eHxgek195zZnamjJw=";
};
in buildNpmPackage' {
in buildNpmPackage' rec {
pname = "vaultwarden-webvault";
inherit version;
src = fetchFromGitHub {
owner = "bitwarden";
repo = "clients";
rev = "web-v${version}";
hash = "sha256-CsbnnP12P7JuGDOm5Ia73SzET/jCx3qRbz9vdUf7lCA=";
rev = "web-v${lib.removeSuffix "b" version}";
hash = "sha256-pSaFksfdxVx7vaozR5h+wpPB42qVgs+aXhV7HGFq71E=";
};
npmDepsHash = "sha256-wWOtVGNOzY2s82nfQDuWgA4ukpJxJr8Z7Y+rFPq2QdU=";
npmDepsHash = "sha256-ZHbKq7EseYNTWjKi+W66WinmReZbpn3kJB3g0N2z4ww=";
postPatch = ''
ln -s ${bw_web_builds}/{patches,resources} ..
PATH="${git}/bin:$PATH" VAULT_VERSION=${bw_web_builds.rev} \
PATH="${git}/bin:$PATH" VAULT_VERSION="${lib.removePrefix "web-" src.rev}" \
bash ${bw_web_builds}/scripts/apply_patches.sh
'';