-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
36 lines (32 loc) · 1.32 KB
/
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
{ # Fetch the latest haskell.nix and import its default.nix
haskellNix ? import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}
# haskell.nix provides access to the nixpkgs pins which are used by our CI,
# hence you will be more likely to get cache hits when using these.
# But you can also just use your own, e.g. '<nixpkgs>'.
, nixpkgsSrc ? haskellNix.sources.nixpkgs-2211
# haskell.nix provides some arguments to be passed to nixpkgs, including some
# patches and also the haskell.nix functionality itself as an overlay.
, nixpkgsArgs ? haskellNix.nixpkgsArgs
# import nixpkgs with overlays
, pkgs ? import nixpkgsSrc nixpkgsArgs
}: pkgs.haskell-nix.project {
# 'cleanGit' cleans a source directory based on the files known by git
src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "tylerbenstercom";
src = ./.;
};
modules = [{
packages.tylerbenster-com.components.exes.site = {
postInstall = ''
wrapProgram $out/bin/site \
--set LANG "en_US.UTF-8" \
--set LOCALE_ARCHIVE "${pkgs.glibcLocales}/lib/locale/locale-archive"
'';
build-tools = [
pkgs.makeWrapper
];
};
}];
# Specify the GHC version to use.
compiler-nix-name = "ghc925"; # Not required for `stack.yaml` based projects.
}