pages/flake.nix
Thomas A. Christensen II a01ef89287
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
chore: Update to latest nixpkgs channel
2025-01-09 14:16:43 -06:00

35 lines
990 B
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
buildInputs = with pkgs; [ hugo nodejs ];
in with pkgs; {
devShells.default = mkShell { inherit buildInputs; };
packages.default = stdenvNoCC.mkDerivation {
name = "millironx-pages";
src = self;
inherit buildInputs;
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
buildPhase = ''
runHook preBuild
HUGO_ENV=production HUGO_ENVIRONMENT=production hugo --minify
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r public/* $out/
runHook postInstall
'';
};
});
}