annotated_annals/flake.nix

39 lines
1.2 KiB
Nix
Raw Normal View History

2022-08-28 12:30:39 -04:00
{
description = "Annotated Annals: A blog";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.hermit-zola = { url = "github:VersBinarii/hermit_zola"; flake = false; };
outputs = { self, nixpkgs, flake-utils, hermit-zola }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
themeName = "hermit_zola";
in
2023-03-27 09:41:04 -04:00
with pkgs;
2022-08-28 12:30:39 -04:00
{
2023-03-27 09:41:04 -04:00
packages.blog = stdenv.mkDerivation rec {
2022-08-28 12:30:39 -04:00
pname = "annotated-annals";
version = "2022-08-28";
src = ./.;
2023-03-27 09:41:04 -04:00
nativeBuildInputs = [ zola ];
2022-08-28 12:30:39 -04:00
configurePhase = ''
mkdir -p "themes/${themeName}"
cp -r ${hermit-zola}/* "themes/${themeName}"
'';
buildPhase = "zola build";
installPhase = "cp -r public $out";
};
defaultPackage = self.packages.${system}.blog;
2023-03-27 09:41:04 -04:00
devShell = mkShell {
2023-06-24 22:21:28 -04:00
packages = [ just zola ];
2022-08-28 12:30:39 -04:00
shellHook = ''
ln -fsn "${hermit-zola}" "themes/${themeName}"
2022-08-28 12:30:39 -04:00
'';
};
});
}