From 68a2b2710f8283e603ed4c6eec2b0c95790fc286 Mon Sep 17 00:00:00 2001 From: rowanG077 Date: Wed, 7 Jun 2023 17:17:44 +0200 Subject: [PATCH] Add nix shell --- shell.nix | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..084e3180 --- /dev/null +++ b/shell.nix @@ -0,0 +1,48 @@ +{ pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs/archive/23.05.tar.gz) {} }: + +let + pythonPkgs = pkgs.python3Packages; + boostPython = pkgs.boost.override { python = pythonPkgs.python; enablePython = true; }; + vscode = pkgs.vscode-with-extensions.override { + vscodeExtensions = with pkgs.vscode-extensions; [ + bbenoist.nix + ms-vscode.cpptools + ms-vscode.cmake-tools + twxs.cmake + usernamehw.errorlens + llvm-vs-code-extensions.vscode-clangd + ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ + { + name = "VerilogHDL"; + publisher = "mshr-h"; + version = "1.11.4"; + sha256 = "sha256-4JY0eaN2IkwHv8u8X6ejDXk6vT1qB4vJjWdIy8b/jj4="; + } + ]; + }; +in pkgs.mkShell { + buildInputs = with pkgs; [ + cmake + eigen + boostPython + pythonPkgs.python + pythonPkgs.apycula + libsForQt5.qt5.qtbase + llvmPackages.openmp + icestorm + trellis + mold + yosys + clang + valgrind + cling + gdb + vscode + ]; + + shellHook = '' + export TRELLIS_INSTALL_PREFIX=${pkgs.trellis} + export ICESTORM_INSTALL_PREFIX=${pkgs.icestorm} + export QT_QPA_PLATFORM_PLUGIN_PATH="${pkgs.libsForQt5.qt5.qtbase.bin}/lib/qt-${pkgs.libsForQt5.qt5.qtbase.version}/plugins"; + ''; +}