2022-11-17 13:24:30 +03:00

21 lines
667 B
Nix

{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
unstable = import <unstable> {};
flags-file = "compile_flags.txt";
in
mkShell {
packages = [ gnumake unstable.verilator ];
shellHook = ''
echo -n > ${flags-file}
echo -DVM_TRACE=1 >> ${flags-file}
echo -xc++ >> ${flags-file}
echo -I./top >> ${flags-file}
echo -I${unstable.verilator}/share/verilator/include >> ${flags-file}
echo -I${clang}/resource-root/include >> ${flags-file}
echo -I${glibc.dev}/include >> ${flags-file}
'';
}