This commit is contained in:
Paul-Nicolas Madelaine 2024-06-11 22:30:58 +02:00
parent f0f281df61
commit d825e28e45

View file

@ -4,29 +4,34 @@
flake-utils.url = "flake-utils"; flake-utils.url = "flake-utils";
}; };
outputs = { outputs =
self, {
nixpkgs, self,
flake-utils, nixpkgs,
}: flake-utils,
flake-utils.lib.eachDefaultSystem (system: let }:
pkgs = import nixpkgs {inherit system;}; flake-utils.lib.eachDefaultSystem (
papermod = pkgs.fetchFromGitHub { system:
owner = "adityatelange"; let
repo = "hugo-PaperMod"; pkgs = import nixpkgs { inherit system; };
rev = "v7.0"; papermod = pkgs.fetchFromGitHub {
hash = "sha256-33EnCEvTxZYn31fxZkYJlQXvJsczXMVufSj6QJJHrLk="; owner = "adityatelange";
}; repo = "hugo-PaperMod";
website = pkgs.stdenv.mkDerivation { rev = "v7.0";
name = "website"; hash = "sha256-33EnCEvTxZYn31fxZkYJlQXvJsczXMVufSj6QJJHrLk=";
src = ./.; };
postPatch = "mkdir themes && cp -r ${papermod} themes/papermod"; website = pkgs.stdenv.mkDerivation {
nativeBuildInputs = [pkgs.hugo]; name = "website";
buildPhase = "hugo"; src = ./.;
installPhase = "cp -r public $out"; postPatch = "mkdir themes && cp -r ${papermod} themes/papermod";
}; nativeBuildInputs = [ pkgs.hugo ];
in { buildPhase = "hugo";
packages.default = website; installPhase = "cp -r public $out";
devShells.default = pkgs.mkShell {packages = [pkgs.hugo];}; };
}); in
{
packages.default = website;
devShells.default = pkgs.mkShell { packages = [ pkgs.hugo ]; };
}
);
} }