-
Notifications
You must be signed in to change notification settings - Fork 108
/
flake.nix
35 lines (32 loc) · 889 Bytes
/
flake.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
{
description = "Dex (named for \"index\") is a research language for typed, functional array processing.";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
llvm-hs-src = {
url = "github:llvm-hs/llvm-hs/llvm-12";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, llvm-hs-src }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs {
inherit system;
config.allowUnfree = true; # Needed for CUDA
});
in rec {
packages.dex = (pkgs.callPackage ./. {
inherit pkgs;
inherit llvm-hs-src;
});
packages.dex-cuda = (pkgs.callPackage ./. {
inherit pkgs;
inherit llvm-hs-src;
withCudaSupport = true;
});
defaultPackage = packages.dex;
devShell = (import ./shell.nix {
inherit pkgs;
});
});
}