ci: rework flake integration

Now Use flake part and integrate a build system using nix package building and treefmt-nix as a flake-part module
This commit is contained in:
Yorick Barbanneau 2025-01-07 00:56:34 +01:00
parent 440e26fb63
commit ffea2b6857
8 changed files with 268 additions and 79 deletions

34
nix/build.nix Normal file
View file

@ -0,0 +1,34 @@
{ inputs, ... }:
let
inherit (inputs.flake-parts.lib) mkPerSystemOption;
in
{
options.perSystem = mkPerSystemOption (
{
pkgs,
config,
...
}:
{
packages.default = pkgs.stdenvNoCC.mkDerivation {
name = "xiemeart";
src = ../.;
nativeBuildInputs = config.buildPackages;
configurePhase = ''
ln -snf ${config.pelicantheme} theme
ln -snf ${config.pelicanplugins} plugins
'';
buildPhase = ''
ls -la
mkdir -p output
pelican --verbose -o output/ 2>& 1>build.log
'';
installPhase = ''
mkdir -p $out/
cp build.log $out/
cp -r output/* $out/
'';
};
}
);
}