-
Notifications
You must be signed in to change notification settings - Fork 32
/
default.nix
37 lines (32 loc) · 938 Bytes
/
default.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
{ pkgs ? import ./nix/nixpkgs.nix, compiler ? null
, forShell ? pkgs.lib.inNixShell, hoogle ? forShell }:
let
haskellPackages =
import ./nix/haskell-packages.nix { inherit pkgs compiler hoogle; };
tools = with pkgs; [
pkgconfig
asciidoctor
python3
doxygen
vulkan-validation-layers
];
generator-ghc-version = "9.2.4";
packages = p:
with p;
if compiler == "ghcHEAD" then [
(pkgs.haskell.lib.dontCheck vulkan)
(pkgs.haskell.lib.dontCheck VulkanMemoryAllocator)
] else
[ vulkan vulkan-utils VulkanMemoryAllocator vulkan-examples openxr ]
++ pkgs.lib.optional (p.ghc.version == generator-ghc-version) generate-new;
in if forShell then
haskellPackages.shellFor {
inherit packages;
buildInputs = tools;
withHoogle = hoogle;
}
else
pkgs.lib.listToAttrs (builtins.map (value: {
inherit value;
name = value.pname;
}) (packages haskellPackages))