switch to hugo
This commit is contained in:
parent
123615ff9a
commit
e581629364
14 changed files with 59 additions and 322 deletions
34
flake.nix
34
flake.nix
|
@ -11,34 +11,22 @@
|
|||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
python = pkgs.python3.withPackages (ps:
|
||||
with ps; [
|
||||
markdown
|
||||
(pelican.overrideAttrs (_: _: {patches = [./pelican.patch];}))
|
||||
(
|
||||
buildPythonPackage rec {
|
||||
pname = "pelican-sitemap";
|
||||
version = "1.1.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "pelican-plugins";
|
||||
repo = "sitemap";
|
||||
rev = version;
|
||||
sha256 = "sha256-GEOLM4wc25VLRZ4qpOENTV6YGfYPHeu95gGdBauJswA=";
|
||||
};
|
||||
format = "pyproject";
|
||||
propagatedBuildInputs = [poetry-core];
|
||||
}
|
||||
)
|
||||
]);
|
||||
papermod = pkgs.fetchFromGitHub {
|
||||
owner = "adityatelange";
|
||||
repo = "hugo-PaperMod";
|
||||
rev = "v7.0";
|
||||
hash = "sha256-33EnCEvTxZYn31fxZkYJlQXvJsczXMVufSj6QJJHrLk=";
|
||||
};
|
||||
website = pkgs.stdenv.mkDerivation {
|
||||
name = "website";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [pkgs.libfaketime python];
|
||||
buildPhase = "faketime @${builtins.toString self.lastModified} make publish";
|
||||
installPhase = "cp -r output $out";
|
||||
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 = [python];};
|
||||
devShells.default = pkgs.mkShell {packages = [pkgs.hugo];};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue