reciproka-web/default.nix

23 lines
579 B
Nix
Raw Normal View History

2021-11-16 04:33:25 +00:00
{ nixpkgs ? import <nixpkgs> { }, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
haskellPackages = if compiler == "default" then
pkgs.haskellPackages
else
pkgs.haskell.packages.${compiler};
2021-11-16 08:25:19 +00:00
jfdic-org = haskellPackages.callPackage ./jfdic-web.nix { };
2021-11-16 04:33:25 +00:00
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
'';
}