Samba: Update Bupstash to 0.10.2.

Change-Id: I7d8f62ae6a6391a3147be152aafc21616fe68fb7
diff --git a/images.nix b/images.nix
index 8db4d03..cc6f495 100644
--- a/images.nix
+++ b/images.nix
@@ -161,7 +161,7 @@
       contents = with pkgs; [
         # Services.
         avahi
-        bupstash
+        (callPackage ./samba/bupstash.nix { })
         dbus
         openssh
         #samba4Full
diff --git a/samba/bupstash.nix b/samba/bupstash.nix
new file mode 100644
index 0000000..1446c70
--- /dev/null
+++ b/samba/bupstash.nix
@@ -0,0 +1,35 @@
+{ lib, fetchFromGitHub, installShellFiles, rustPlatform, ronn, pkg-config, libsodium }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "bupstash";
+  version = "0.10.2";
+
+  src = fetchFromGitHub {
+    owner = "andrewchambers";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-0PKQYvKmAGP4/15nKhB+aZh8PF9dtDFjXEuPCA5tDYk=";
+  };
+
+  cargoSha256 = "sha256-6zVWKVtTL6zbB4Uulq+sK4vm3qAC0B5kf0DmDv5aneo=";
+
+  nativeBuildInputs = [ ronn pkg-config installShellFiles ];
+  buildInputs = [ libsodium ];
+
+  postBuild = ''
+    RUBYOPT="-KU -E utf-8:utf-8" ronn -r doc/man/*.md
+  '';
+
+  postInstall = ''
+    installManPage doc/man/*.[1-9]
+  '';
+
+  meta = with lib; {
+    description = "Easy and efficient encrypted backups";
+    homepage = "https://bupstash.io";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ andrewchambers ];
+  };
+}
+