forked from MercuryTechnologies/ghc-persistent-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
53 lines (49 loc) · 1.22 KB
/
flake.nix
File metadata and controls
53 lines (49 loc) · 1.22 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
{
description = "A flake for ghc-persistent-worker";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
};
in
{
devShells.default =
let
libs = [
pkgs.zstd
pkgs.xz
pkgs.bzip2
pkgs.zlib
];
in
pkgs.mkShell {
ghc_dir = "${pkgs.haskell.compiler.ghc910}";
packages = [
(pkgs.haskell.packages.ghc910.ghcWithPackages (g: [ g.cabal-install ]))
pkgs.zlib.dev
pkgs.snappy
pkgs.protobuf
pkgs.git
pkgs.nixfmt-rfc-style
] ++ libs;
shellHook = ''
# prompt
export PS1="\n[ghc-persistent-worker:\w]$ \0"
# dynamic library path
export LD_LIBRARY_PATH="${pkgs.lib.makeSearchPathOutput "out" "lib" libs}:$LD_LIBRARY_PATH"
'';
};
}
);
}