48 lines
789 B
Nix
48 lines
789 B
Nix
{pkgs ? import <nixpkgs> {}}:
|
|
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
|
|
stdenv.mkDerivation rec {
|
|
name = "brokentech.cloud-${version}";
|
|
version = "1.1.0";
|
|
|
|
src = ./.;
|
|
|
|
nativeBuildInputs = [
|
|
hugo
|
|
];
|
|
|
|
buildPhase = ''
|
|
ln -s ${vendoredDeps} _vendor
|
|
hugo
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp -r ./public/* $out
|
|
'';
|
|
}
|