mart-w.de/default.nix

49 lines
791 B
Nix
Raw Normal View History

2024-02-13 03:28:47 +01:00
{pkgs ? import <nixpkgs> {}}:
2024-02-14 13:58:08 +01:00
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
2024-02-13 03:28:47 +01:00
stdenv.mkDerivation rec {
name = "mart-w.de-${version}";
2024-04-03 03:04:50 +02:00
version = "1.0.1";
2024-02-13 03:28:47 +01:00
src = ./.;
nativeBuildInputs = [
2024-02-14 13:58:08 +01:00
go
2024-02-13 03:28:47 +01:00
hugo
];
buildPhase = ''
2024-02-14 13:58:08 +01:00
ln -s ${vendoredDeps} _vendor
2024-02-13 03:28:47 +01:00
hugo
'';
installPhase = ''
mkdir -p $out
cp -r ./public/* $out
'';
}