From 427051dbfff124464f78890a46f1e9848782d6c4 Mon Sep 17 00:00:00 2001 From: Paul-Nicolas Madelaine Date: Mon, 18 Sep 2023 14:21:35 +0200 Subject: [PATCH] add nix derivation --- flake.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 311a91e..1e838ff 100644 --- a/flake.nix +++ b/flake.nix @@ -10,11 +10,15 @@ let pkgs = import nixpkgs { inherit system; }; python = pkgs.python3.withPackages (ps: with ps; [ markdown pelican ]); + website = pkgs.stdenv.mkDerivation { + name = "website"; + src = ./.; + nativeBuildInputs = [ python ]; + buildFlags = [ "publish" ]; + installPhase = "cp -r output $out"; + }; in { - packages.default = pkgs.writeTextDir "index.html" '' - Hello world! - This is the personal website of Paul-Nicolas Madelaine. - ''; + packages.default = website; devShells.default = pkgs.mkShell { packages = [ python ]; }; });