website/flake.nix

38 lines
963 B
Nix
Raw Normal View History

2023-09-16 09:16:56 +00:00
{
inputs = {
2024-09-09 07:57:32 +00:00
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
2023-09-16 09:16:56 +00:00
};
2024-06-11 20:30:58 +00:00
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
papermod = pkgs.fetchFromGitHub {
owner = "adityatelange";
repo = "hugo-PaperMod";
rev = "v7.0";
hash = "sha256-33EnCEvTxZYn31fxZkYJlQXvJsczXMVufSj6QJJHrLk=";
};
website = pkgs.stdenv.mkDerivation {
name = "website";
src = ./.;
postPatch = "mkdir themes && cp -r ${papermod} themes/papermod";
nativeBuildInputs = [ pkgs.hugo ];
buildPhase = "hugo";
installPhase = "cp -r public $out";
};
in
{
packages.default = website;
devShells.default = pkgs.mkShell { packages = [ pkgs.hugo ]; };
}
);
2023-09-16 09:16:56 +00:00
}