From 1c8d856d1ebec9950355fc53379c1f2920e4265c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 30 Nov 2019 06:35:58 +0000 Subject: [PATCH 1/2] README.md: Add missing requirements --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f98ee191..2985fa7c 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,9 @@ Mozilla Sync Storage built with [Rust](https://rust-lang.org). - MySQL 5.7 (or compatible) -\* libmysqlclient (`brew install mysql` on macOS, `apt-get install libmysqlclient-dev` on Ubuntu) - [Go](https://golang.org/doc/install) +- Cmake +- Pkg-config +- Openssl Depending on your OS, you may also need to install `libgrpcdev`, and `protobuf-compiler-grpc`. From 1d28560a1293ca92d108284d9729f881bc40acde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 30 Nov 2019 06:52:19 +0000 Subject: [PATCH 2/2] provide shell.nix Nix is a distribution independent package manager. By providing this file user of nix get automatically all required build dependencies by sourcing default.nix via a tool called nix-shell. This should lower the entry barrier when setting up a build environment. Nix is also used in other places in Mozilla: https://github.com/mozilla/nixpkgs-mozilla --- shell.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..219e655a --- /dev/null +++ b/shell.nix @@ -0,0 +1,20 @@ +# Nix is a powerful package manager for Linux and other Unix systems that makes +# package management reliable and reproducible: https://nixos.org/nix/. +# This file is intended to be used with `nix-shell` +# (https://nixos.org/nix/manual/#sec-nix-shell) to setup a fully-functional +# syncstorage-rs build environment by installing all required dependencies. +with import {}; +stdenv.mkDerivation { + name = "syncstorage-rs"; + buildInputs = [ + rustc + cargo + libmysqlclient + pkgconfig + openssl + cmake + protobuf + go + ]; + NIX_LDFLAGS = "-L${libmysqlclient}/lib/mysql"; +}