reciproka-web/default.nix
2021-11-16 18:25:19 +10:00

23 lines
579 B
Nix

{ nixpkgs ? import <nixpkgs> { }, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
haskellPackages = if compiler == "default" then
pkgs.haskellPackages
else
pkgs.haskell.packages.${compiler};
jfdic-org = haskellPackages.callPackage ./jfdic-web.nix { };
in nixpkgs.stdenv.mkDerivation {
name = "jfdic-org-website";
buildInputs = [ jfdic-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
'';
}