diff --git a/shell.nix b/shell.nix index 043df5cf..41aafff2 100644 --- a/shell.nix +++ b/shell.nix @@ -3,21 +3,23 @@ let url = "https://github.com/nixos/nixpkgs/"; ref = "refs/tags/24.05"; }) {}; - stdenv = pkgs.overrideCC pkgs.stdenv pkgs.gcc7; - # stuck with GCC 7 because Cilk was kicked out in GCC 8, - # need OpenCilk packaged in nixpkgs, see - # https://github.com/NixOS/nixpkgs/issues/144256 - ghc = pkgs.haskell.compiler.ghc910; clang = pkgs.clang_16; llvm = pkgs.llvm_16; gibbon_dir = builtins.toString ./.; in with pkgs; - stdenv.mkDerivation { + + # we are stuck with GCC 7 because Cilk was kicked out in GCC 8, + # OpenCilk needs packaging in nixpkgs, see + # https://github.com/NixOS/nixpkgs/issues/144256 + mkShell.override { stdenv = pkgs.gcc7Stdenv; } { + + # we use default Haskell toolchain supplied with the chosen nixpkgs; this way we hit their cache + inputsFrom = [ (pkgs.haskellPackages.callCabal2nix "gibbon-compiler" ./gibbon-compiler { }).env ]; + name = "basicGibbonEnv"; - buildInputs = [ # Haskell - ghc cabal-install stack + buildInputs = [ # C/C++ clang llvm gcc7 boehmgc uthash # Rust