-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
39 lines (33 loc) · 1.03 KB
/
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
36
37
38
39
{
description = "LLaMa2 in Haskell";
inputs = {
nixpkgs.url = "github:NixOS//nixpkgs/24.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
haskellPackages = pkgs.haskell.packages.ghc948;
packageName = "llama2";
in {
packages.${packageName} = haskellPackages.callCabal2nix packageName ./. {};
defaultPackage = self.packages.${system}.${packageName};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
haskellPackages.ghc
haskellPackages.cabal-install
haskellPackages.haskell-language-server
zlib.dev
# Add other packages you need in your development environment
];
shellHook = ''
echo "GHC version: $(ghc --version)"
echo "Cabal version: $(cabal --version)"
'';
};
}
);
}