Skip to content

Commit

Permalink
get haskell packages from nixpkgs too
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses4ever committed Jul 8, 2024
1 parent 7ba4bb2 commit 3cfdb74
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3cfdb74

Please sign in to comment.