23 lines
571 B
Nix
23 lines
571 B
Nix
|
{ nixpkgs ? import <nixpkgs> { }, compiler ? "default" }:
|
||
|
let
|
||
|
inherit (nixpkgs) pkgs;
|
||
|
haskellPackages = if compiler == "default" then
|
||
|
pkgs.haskellPackages
|
||
|
else
|
||
|
pkgs.haskell.packages.${compiler};
|
||
|
voc-org = haskellPackages.callPackage ./voc-web.nix { };
|
||
|
in nixpkgs.stdenv.mkDerivation {
|
||
|
name = "voc-org-website";
|
||
|
buildInputs = [ voc-org ];
|
||
|
src = ./.;
|
||
|
buildPhase = ''
|
||
|
echo "Setting LC_ALL to C.UTF-8 to avoid invalid byte sequence."
|
||
|
export LC_ALL=C.UTF-8
|
||
|
site build
|
||
|
'';
|
||
|
installPhase = ''
|
||
|
mkdir $out
|
||
|
cp -R _site/* $out
|
||
|
'';
|
||
|
}
|