nix: create site build target
This commit is contained in:
parent
20e4eabc65
commit
f0e31569d9
23
default.nix
23
default.nix
|
@ -1 +1,22 @@
|
|||
(import ./release.nix { }).project
|
||||
{ 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-org.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
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue