From f85f2edce5356f21a5341dc8236dac20f432ea9f Mon Sep 17 00:00:00 2001 From: Martin Wurm Date: Wed, 14 Feb 2024 13:58:08 +0100 Subject: [PATCH] initialise stack theme setup --- default.nix | 35 +++++++++++++++++++++++++++++++---- hugo.toml | 6 +++++- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/default.nix b/default.nix index aee0615..6f9af10 100644 --- a/default.nix +++ b/default.nix @@ -1,16 +1,43 @@ {pkgs ? import {}}: -with pkgs; - stdenv.mkDerivation rec { - name = "mart-w.de-${version}"; - version = "0.1"; +with pkgs; let + vendoredDeps = stdenv.mkDerivation rec { + name = "hugoVendoredDeps"; src = ./.; nativeBuildInputs = [ + git + go hugo ]; buildPhase = '' + hugo mod vendor + ''; + + installPhase = '' + mkdir -p $out + cp -r ./_vendor/* $out + ''; + + outputHashMode = "recursive"; + outputHashAlgo = "sha256"; + outputHash = "sha256-8dsJlVvCHUE/rI9YkuJVF+Nk2DeUIAiNLR4Fu/YZg50="; + }; +in + stdenv.mkDerivation rec { + name = "mart-w.de-${version}"; + version = "1.1.0"; + + src = ./.; + + nativeBuildInputs = [ + go + hugo + ]; + + buildPhase = '' + ln -s ${vendoredDeps} _vendor hugo ''; diff --git a/hugo.toml b/hugo.toml index 4c2c842..2fa6daa 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,3 +1,7 @@ baseURL = 'https://mart-w.de/' -languageCode = 'en-gb' +languageCode = 'de-de' title = 'mart-w’s amazing homepage' + +[module] +[[module.imports]] +path = "github.com/CaiJimmy/hugo-theme-stack/v3"