diff options
author | Ivan Kozik <ivan@ludios.org> | 2021-11-16 07:53:28 +0000 |
---|---|---|
committer | Ivan Kozik <ivan@ludios.org> | 2021-11-16 07:57:26 +0000 |
commit | a153ef57e0a36f5fc908ab0e7d65f0fb4ac667d4 (patch) | |
tree | 6b8162b7316ec290b0962b2f64b70a9c551ebd28 /pkgs/tools/security/vaultwarden | |
parent | 6b68d74f036def3d48a23969edfd0fa47f34af3e (diff) |
vaultwarden: fix the build for rustc 1.56
rustc 1.55 was ignoring vaultwarden's `rust-version = 1.57`, causing the build to succeed. rustc 1.56 was erroring out because it does not ignore the minimum `rust-version`. Patch out the `rust-version` because we do not really need 1.57; rustc 1.56 with RUSTC_BOOTSTRAP=1 produces a working vaultwarden. This fixes https://github.com/NixOS/nixpkgs/issues/146215
Diffstat (limited to 'pkgs/tools/security/vaultwarden')
-rw-r--r-- | pkgs/tools/security/vaultwarden/default.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/tools/security/vaultwarden/default.nix b/pkgs/tools/security/vaultwarden/default.nix index 2d2816dac0f02..6bdf428b199be 100644 --- a/pkgs/tools/security/vaultwarden/default.nix +++ b/pkgs/tools/security/vaultwarden/default.nix @@ -19,12 +19,20 @@ in rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-ViXpoPkBznB0o/dc/l1r3m0y+z2w58wqlU8/cg8u7tI="; + postPatch = '' + # Upstream specifies 1.57; nixpkgs has 1.56 which also produces a working + # vaultwarden when using RUSTC_BOOTSTRAP=1 + sed -ri 's/^rust-version = .*//g' Cargo.toml + ''; + 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; cargoBuildFlags = [ featuresFlag ]; @@ -42,6 +50,6 @@ in rustPlatform.buildRustPackage rec { description = "Unofficial Bitwarden compatible server written in Rust"; homepage = "https://github.com/dani-garcia/vaultwarden"; license = licenses.gpl3Only; - maintainers = with maintainers; [ msteen ]; + maintainers = with maintainers; [ msteen ivan ]; }; } |