Add nix-shell to help test/build on NixOS (#1819)

This commit is contained in:
Dawid Ciężarkiewicz 2018-11-08 14:26:25 -08:00 committed by Ignotus Peverell
parent ee19cfcf86
commit a98f2afa29

19
shell.nix Normal file
View file

@ -0,0 +1,19 @@
# Run `nix-shell` to be able
# to build Grin on NixOS.
{ pkgs ? import <nixpkgs> {} }:
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++
'';
}