Teach flake.nix to build website
This commit is contained in:
parent
1ef1c82b87
commit
a7be6d1b37
29
flake.nix
29
flake.nix
|
@ -5,11 +5,26 @@
|
|||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
||||
{
|
||||
devShell = import ./shell.nix { inherit pkgs; };
|
||||
}
|
||||
);
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
defaultPackage = pkgs.stdenv.mkDerivation {
|
||||
name = "erambler-html";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ pkgs.hugo ];
|
||||
buildPhase = "hugo";
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -R public/* $out
|
||||
'';
|
||||
};
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
(python38.withPackages
|
||||
(py: with py; [ python invoke rich requests ruamel_yaml sh ]))
|
||||
yarn
|
||||
hugo
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user