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 = [
|
||||
"--config" configFile
|
||||
];
|
||||
hugoArgsStr = lib.concatStringsSep " " hugoArgs;
|
||||
in
|
||||
{
|
||||
projectShells.landing = {
|
||||
commands.hugo = {
|
||||
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