From a98f2afa29faac6394d04014bbd6a92fbad15ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ci=C4=99=C5=BCarkiewicz?= Date: Thu, 8 Nov 2018 14:26:25 -0800 Subject: [PATCH] Add `nix-shell` to help test/build on NixOS (#1819) --- shell.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 000000000..12d7ac3b8 --- /dev/null +++ b/shell.nix @@ -0,0 +1,19 @@ +# Run `nix-shell` to be able +# to build Grin on NixOS. +{ pkgs ? import {} }: + +pkgs.stdenv.mkDerivation { + name = "grin"; + + buildInputs = with pkgs; [ + ncurses cmake clang + ]; + + shellHook = '' + LD_LIBRARY_PATH=${pkgs.ncurses}/lib/:$LD_LIBRARY_PATH + LD_LIBRARY_PATH=${pkgs.zlib}/lib/:$LD_LIBRARY_PATH + LIBRARY_PATH=${pkgs.zlib}/lib/:$LIBRARY_PATH + LD_LIBRARY_PATH=${pkgs.llvmPackages.libclang}/lib/:$LD_LIBRARY_PATH + CXX=${pkgs.clang}/bin/clang++ + ''; +}