website/flake.nix

31 lines
742 B
Nix
Raw Normal View History

2023-09-16 09:16:56 +00:00
{
inputs = {
nixpkgs.url = "nixpkgs";
flake-utils.url = "flake-utils";
};
2023-09-19 22:27:17 +00:00
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
python = pkgs.python3.withPackages (ps:
with ps; [
markdown
(pelican.overrideAttrs (_: _: {patches = [./pelican.patch];}))
]);
website = pkgs.stdenv.mkDerivation {
name = "website";
src = ./.;
nativeBuildInputs = [python];
buildFlags = ["publish"];
installPhase = "cp -r output $out";
};
in {
packages.default = website;
devShells.default = pkgs.mkShell {packages = [python];};
});
2023-09-16 09:16:56 +00:00
}