Skip to content

Instantly share code, notes, and snippets.

@washort
Last active February 5, 2019 14:48
Show Gist options
  • Save washort/26786982e6638f8904c0ff848c884d2b to your computer and use it in GitHub Desktop.
Save washort/26786982e6638f8904c0ff848c884d2b to your computer and use it in GitHub Desktop.
diff -Nru .cargo-orig/config .cargo/config
--- a/.cargo/config 1969-12-31 18:00:00.000000000 -0600
+++ b/.cargo/config 2019-02-04 22:55:37.237658171 -0600
@@ -0,0 +1,17 @@
+[source.crates-io]
+replace-with = "vendored-sources"
+
+[source."https://github.com/dani-garcia/msgpack-rust"]
+git = "https://github.com/dani-garcia/msgpack-rust"
+branch = "master"
+replace-with = "vendored-sources"
+
+[source."https://github.com/lettre/lettre"]
+git = "https://github.com/lettre/lettre"
+rev = "c988b1760ad81"
+replace-with = "vendored-sources"
+
+[source."https://github.com/lettre/rust-email"]
+git = "https://github.com/lettre/rust-email"
+branch = "master"
+replace-with = "vendored-sources"
let
rust_nightly = pkgs.rustChannelOf {
date = "2019-02-01";
channel = "nightly";
};
in
pkgs.callPackage ../../bitwarden/bitwarden_rs/default.nix {
rustPlatform = pkgs.recurseIntoAttrs (pkgs.makeRustPlatform rust_nightly);
};
{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl }:
rustPlatform.buildRustPackage rec {
name = "${pname}-${version}";
pname = "bitwarden_rs";
version = "1.6.1";
src = fetchFromGitHub {
owner = "dani-garcia";
repo = pname;
rev = "1.6.1";
sha256 = "14rajlk7a0g0a69km7br5lssgqiriv4dadila5sharxvl627gf7m";
};
patches = [ ./cargo-config-1.patch ];
buildInputs = [ pkgconfig openssl ];
RUSTC_BOOTSTRAP=1;
cargoSha256 = "1jsb00qj0sfk8jkfxmgxzhipb6fyf2wgq4k536zm7gqzjn8xr9b6";
meta = with stdenv.lib; {
description = "An unofficial lightweight implementation of the bitwarden-server using rust and sqlite";
homepage = https://github.com/dani-garcia/bitwarden_rs;
license = licenses.GPL3;
maintainers = with maintainers; [ msteen ];
platforms = platforms.all;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment