From ce0f0ec9353254f890834a6f32574b222d06eeab Mon Sep 17 00:00:00 2001 From: Eli Flanagan Date: Tue, 19 Feb 2019 09:54:07 -0500 Subject: [PATCH] use nix-shell to build on nixos Fix #616. Add brief documentation for how to use it. --- .gitignore | 3 +++ .../documentation/getting-started/installation.md | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/.gitignore b/.gitignore index ef376f6..f9c3472 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ snap/.snapcraft parts prime stage + +# nixos dependencies snippet +shell.nix diff --git a/docs/content/documentation/getting-started/installation.md b/docs/content/documentation/getting-started/installation.md index 6f7f4dc..03c3600 100644 --- a/docs/content/documentation/getting-started/installation.md +++ b/docs/content/documentation/getting-started/installation.md @@ -49,6 +49,19 @@ To build it from source, you will need to have Git, [Rust (at least 1.30) and Ca installed. You will also need additional dependencies to compile [libsass](https://github.com/sass/libsass): - OSX, Linux and other Unix: `make` (`gmake` on BSDs), `g++`, `libssl-dev` + - NixOS: Create a `shell.nix` file in the root of the cloned project with the following contents: + ```nix + with import {}; + + pkgs.mkShell { + buildInputs = [ + libsass + openssl + pkgconfig + ]; + } + ``` + - Then invoke `nix-shell`. This opens a shell with the above dependencies. You then run `cargo build --release` to build the project. - Windows (a bit trickier): updated `MSVC` and overall updated VS installation From a terminal, you can now run the following command: