forked from haskell-infra/www.haskell.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
36 lines (32 loc) · 814 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
{ doCheck ? true
, sources ? import ./nix/sources.nix
, pkgs ? import sources.nixpkgs {}
}:
let
builder = import ./builder { inherit sources pkgs; };
built = pkgs.stdenv.mkDerivation {
name = "haskell.org";
inherit doCheck;
src = pkgs.nix-gitignore.gitignoreSourcePure [
./.gitignore
".git"
"*.cabal"
"*.hs"
".github"
] ./.;
buildInputs = [ builder pkgs.linkchecker ];
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
LC_ALL = "C.UTF-8";
buildPhase = ''
${builder}/bin/haskell-org-site build
'';
checkPhase = ''
linkchecker _site
'';
installPhase = ''
cp -r _site $out
'';
};
in
if pkgs.lib.inNixShell then builder
else { inherit builder built; inherit (pkgs) linkchecker lftp; }