polygon-art/shell.nix

35 lines
562 B
Nix
Raw Normal View History

{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
buildInputs = with pkgs; [
rustc
cargo
rustfmt
cairo
geos
clipper
clang
llvm
(pkgs.writers.writeBashBin "reformat" ''
for file in `find ${toString ./.} -type f | egrep "\.rs$"`
do
${pkgs.rustfmt}/bin/rustfmt "$file"
done
'')
];
# run this on start
# -----------------
shellHook = ''
export NIX_ENFORCE_PURITY=0
# Needed so bindgen can find libclang.so
export LIBCLANG_PATH="${pkgs.llvmPackages.libclang}/lib";
'';
}