-
Notifications
You must be signed in to change notification settings - Fork 19
/
shell.nix
41 lines (35 loc) · 1.16 KB
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This file is used by nix-shell.
# It just takes the shell attribute from default.nix.
{ config ? {}
, sourcesOverride ? {}
# If true, activates CUDA support
, cudaSupport ? false
# If cudaSupport is true, this needs to be set to a valid CUDA major version number, e.g. 10:
# nix-shell --arg cudaSupport true --argstr cudaMajorVersion 10
, cudaMajorVersion ? null
, withHoogle ? false
, pkgs ? import ./nix/default.nix {
inherit config sourcesOverride cudaSupport cudaMajorVersion;
}
}:
with pkgs;
let
# This provides a development environment that can be used with nix-shell or
# lorri. See https://input-output-hk.github.io/haskell.nix/user-guide/development/
shell = hasktorchSkeletonHaskellPackages.shellFor {
name = "hasktorch-skeleton-dev-shell";
tools = {
cabal = "3.2.0.0";
haskell-language-server = "latest";
};
# Prevents cabal from choosing alternate plans, so that
# *all* dependencies are provided by Nix.
# TODO: Set to true as soon as haskell.nix issue #231 is resolved.
exactDeps = false;
shellHook = ''
export CPATH=${torch}/include/torch/csrc/api/include
'';
inherit withHoogle;
};
in
shell