reciproka-web/default.nix
2024-01-08 17:18:12 +10:00

23 lines
592 B
Nix

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