2024-02-13 11:00:12 +01:00
|
|
|
{pkgs ? import <nixpkgs> {}}:
|
2024-02-14 07:36:34 +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-3suJ9/OXtEqm3eg1zCEoA0TrAN+dYu+l6YRWjB41c6w=";
|
|
|
|
};
|
|
|
|
in
|
2024-02-13 11:00:12 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "brokentech.cloud-${version}";
|
2024-02-14 07:37:56 +01:00
|
|
|
version = "1.0";
|
2024-02-13 11:00:12 +01:00
|
|
|
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
hugo
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2024-02-14 07:36:34 +01:00
|
|
|
ln -s ${vendoredDeps} _vendor
|
2024-02-13 11:00:12 +01:00
|
|
|
hugo
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r ./public/* $out
|
|
|
|
'';
|
|
|
|
}
|