packages/landing: init package
This commit is contained in:
parent
cff89b6864
commit
c81e351e63
1 changed files with 19 additions and 1 deletions
|
@ -15,12 +15,30 @@ let
|
||||||
hugoArgs = [
|
hugoArgs = [
|
||||||
"--config" configFile
|
"--config" configFile
|
||||||
];
|
];
|
||||||
|
hugoArgsStr = lib.concatStringsSep " " hugoArgs;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
projectShells.landing = {
|
projectShells.landing = {
|
||||||
commands.hugo = {
|
commands.hugo = {
|
||||||
help = pkgs.hugo.meta.description;
|
help = pkgs.hugo.meta.description;
|
||||||
command = "exec ${pkgs.hugo}/bin/hugo ${lib.concatStringsSep " " hugoArgs} \"$@\"";
|
command = "exec ${pkgs.hugo}/bin/hugo ${hugoArgsStr} \"$@\"";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
packages.landing = with pkgs; let
|
||||||
|
site = stdenvNoCC.mkDerivation rec {
|
||||||
|
pname = "private-void-landing-page";
|
||||||
|
version = "0.0.0";
|
||||||
|
src = ./.;
|
||||||
|
nativeBuildInputs = [
|
||||||
|
hugo
|
||||||
|
];
|
||||||
|
buildCommand = ''
|
||||||
|
unpackPhase
|
||||||
|
mkdir -p $out/share/www
|
||||||
|
hugo ${hugoArgsStr} -s $sourceRoot -d $out/share/www/${pname}
|
||||||
|
'';
|
||||||
|
passthru.webroot = "${site}/share/www/${site.pname}";
|
||||||
|
};
|
||||||
|
in site;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue