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