polygon-art/shell.nix

37 lines
580 B
Nix

{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
buildInputs = with pkgs; [
rustc
cargo
rustfmt
cairo
geos
clipper
clang
llvm
pkg-config
(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";
'';
}