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";
|
||||
}
|
27
flake.nix
27
flake.nix
|
@ -26,22 +26,13 @@
|
|||
nixpkgs,
|
||||
zerm,
|
||||
...
|
||||
}: (flake-utils.lib.eachDefaultSystem (system: let
|
||||
}:
|
||||
(flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [devshell.overlays.default];
|
||||
};
|
||||
pkg = pkgs.stdenv.mkDerivation {
|
||||
pname = "averywinters.org";
|
||||
version = "1.0.0";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [pkgs.zola];
|
||||
configurePhase = ''
|
||||
mkdir -p themes
|
||||
ln -snf "${zerm}" "themes/zerm"
|
||||
'';
|
||||
buildPhase = "zola build";
|
||||
installPhase = "cp -r public $out";
|
||||
overlays = [
|
||||
devshell.overlays.default
|
||||
];
|
||||
};
|
||||
in {
|
||||
formatter = pkgs.alejandra;
|
||||
|
@ -58,9 +49,11 @@
|
|||
inherit commands;
|
||||
devshell.startup.themes.text = startupScript;
|
||||
};
|
||||
packages.default = pkg;
|
||||
packages.default = pkgs.callPackage ./default.nix {inherit zerm;};
|
||||
}))
|
||||
// {
|
||||
overlays.default = final: prev: {
|
||||
www = pkg;
|
||||
www = prev.callPackage ./default.nix {inherit zerm;};
|
||||
};
|
||||
};
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue