resrok-web/default.nix

23 lines
583 B
Nix

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