Fix overlay
This commit is contained in:
parent
df18811cb3
commit
8c8ad06439
2 changed files with 45 additions and 35 deletions
17
default.nix
Normal file
17
default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
zola,
|
||||||
|
zerm,
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "averywinters.org";
|
||||||
|
version = "1.0.0";
|
||||||
|
src = ./.;
|
||||||
|
nativeBuildInputs = [zola];
|
||||||
|
configurePhase = ''
|
||||||
|
mkdir -p themes
|
||||||
|
ln -snf "${zerm}" "themes/zerm"
|
||||||
|
'';
|
||||||
|
buildPhase = "zola build";
|
||||||
|
installPhase = "cp -r public $out";
|
||||||
|
}
|
63
flake.nix
63
flake.nix
|
@ -26,41 +26,34 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
zerm,
|
zerm,
|
||||||
...
|
...
|
||||||
}: (flake-utils.lib.eachDefaultSystem (system: let
|
}:
|
||||||
pkgs = import nixpkgs {
|
(flake-utils.lib.eachDefaultSystem (system: let
|
||||||
inherit system;
|
pkgs = import nixpkgs {
|
||||||
overlays = [devshell.overlays.default];
|
inherit system;
|
||||||
};
|
overlays = [
|
||||||
pkg = pkgs.stdenv.mkDerivation {
|
devshell.overlays.default
|
||||||
pname = "averywinters.org";
|
];
|
||||||
version = "1.0.0";
|
};
|
||||||
src = ./.;
|
in {
|
||||||
nativeBuildInputs = [pkgs.zola];
|
formatter = pkgs.alejandra;
|
||||||
configurePhase = ''
|
devShells.default = let
|
||||||
mkdir -p themes
|
commands = [
|
||||||
ln -snf "${zerm}" "themes/zerm"
|
{package = pkgs.zola;}
|
||||||
'';
|
];
|
||||||
buildPhase = "zola build";
|
startupScript = ''
|
||||||
installPhase = "cp -r public $out";
|
mkdir -p themes
|
||||||
};
|
ln -snf "${zerm}" "themes/zerm"
|
||||||
in {
|
'';
|
||||||
formatter = pkgs.alejandra;
|
in
|
||||||
devShells.default = let
|
pkgs.devshell.mkShell {
|
||||||
commands = [
|
inherit commands;
|
||||||
{package = pkgs.zola;}
|
devshell.startup.themes.text = startupScript;
|
||||||
];
|
};
|
||||||
startupScript = ''
|
packages.default = pkgs.callPackage ./default.nix {inherit zerm;};
|
||||||
mkdir -p themes
|
}))
|
||||||
ln -snf "${zerm}" "themes/zerm"
|
// {
|
||||||
'';
|
overlays.default = final: prev: {
|
||||||
in
|
www = prev.callPackage ./default.nix {inherit zerm;};
|
||||||
pkgs.devshell.mkShell {
|
|
||||||
inherit commands;
|
|
||||||
devshell.startup.themes.text = startupScript;
|
|
||||||
};
|
};
|
||||||
packages.default = pkg;
|
|
||||||
overlays.default = final: prev: {
|
|
||||||
www = pkg;
|
|
||||||
};
|
};
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue