make the thing go nix

This commit is contained in:
Martin Wurm 2024-02-14 07:36:34 +01:00
parent 8fc7bcb788
commit c524a4a820

View file

@ -1,8 +1,7 @@
{pkgs ? import <nixpkgs> {}}:
with pkgs;
stdenv.mkDerivation rec {
name = "brokentech.cloud-${version}";
version = "0.1";
with pkgs; let
vendoredDeps = stdenv.mkDerivation rec {
name = "hugoVendoredDeps";
src = ./.;
@ -13,6 +12,31 @@ with pkgs;
];
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 = "0.1";
src = ./.;
nativeBuildInputs = [
hugo
];
buildPhase = ''
ln -s ${vendoredDeps} _vendor
hugo
'';