From c81e351e63e37717eb9bb1f86151a3d81fe9d80c Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 31 Jul 2022 16:56:08 +0200 Subject: [PATCH] packages/landing: init package --- packages/websites/landing/project.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/websites/landing/project.nix b/packages/websites/landing/project.nix index a706c93..22903f4 100644 --- a/packages/websites/landing/project.nix +++ b/packages/websites/landing/project.nix @@ -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; }