2021-03-30 22:27:12 +02:00
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
pkgs.mkShell {
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
rustc
|
|
|
|
cargo
|
|
|
|
rustfmt
|
|
|
|
|
|
|
|
cairo
|
|
|
|
geos
|
|
|
|
clipper
|
|
|
|
|
|
|
|
clang
|
|
|
|
llvm
|
2021-04-10 13:33:56 +02:00
|
|
|
pkg-config
|
2021-03-30 22:27:12 +02:00
|
|
|
|
|
|
|
(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 = ''
|
2021-04-10 13:33:56 +02:00
|
|
|
# export NIX_ENFORCE_PURITY=0
|
|
|
|
|
2021-03-30 22:27:12 +02:00
|
|
|
# Needed so bindgen can find libclang.so
|
|
|
|
export LIBCLANG_PATH="${pkgs.llvmPackages.libclang}/lib";
|
|
|
|
'';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|