Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[inferno-ml] Re-add nonReinstallablePkgs and fix inferno-ml shell environment #163

Merged
merged 3 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ allow-newer: all
constraints:
lsp < 1.7
, lsp-types < 1.7
, entropy == 0.4.1.0

source-repository-package
type: git
Expand Down
7 changes: 7 additions & 0 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ pkgs.haskell-nix.cabalProject {
buildInputs = [
pkgs.postgresql
config.treefmt.build.wrapper
pkgs.torch
pkgs.torch.dev
]
++ builtins.attrValues config.treefmt.build.programs;
shellHook =
Expand All @@ -79,9 +81,14 @@ pkgs.haskell-nix.cabalProject {
esac
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$llp"
'';

# Setting the `LD_LIBRARY_PATH` and `CPLUS_INCLUDE_PATH` manually is
# needed for `cabal repl` to be able to find the libs for Hasktorch
# (ghci doesn't invoke GCC)
torchHook = ''
${setpath}
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${inputs.tokenizers}/lib"
export CPLUS_INCLUDE_PATH=${lib.getDev pkgs.torch}/include/torch/csrc/api/include
'';
in
''
Expand Down
36 changes: 36 additions & 0 deletions nix/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,40 @@
postgresql-libpq-configure.components.library.libs =
lib.mkForce [ pkgs.postgresql ];
};

nonReinstallablePkgs = lib.mkForce
[
"system-cxx-std-lib"
"rts"
"ghc-prim"
"integer-gmp"
"integer-simple"
"base"
"containers"
"binary"
"bytestring"
"text"
"deepseq"
"exceptions"
"array"
"ghc-boot-th"
"ghc-internal"
"entropy"
"Cabal"
"Cabal-syntax"
"cabal-doctest"
"file-io"
"pretty"
"template-haskell"
"ghc-bignum"
"filepath"
"directory"
"process"
"transformers"
"stm"
"exceptions"
"mtl"
"time"
"unix"
];
}
Loading