Teach flake.nix to build website
This commit is contained in:
parent
1ef1c82b87
commit
a7be6d1b37
|
@ -11,3 +11,4 @@ deploy.yaml
|
||||||
resources
|
resources
|
||||||
.direnv
|
.direnv
|
||||||
.envrc
|
.envrc
|
||||||
|
result
|
||||||
|
|
29
flake.nix
29
flake.nix
|
@ -5,11 +5,26 @@
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
flake-utils.lib.eachDefaultSystem
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
(system:
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
in {
|
||||||
{
|
defaultPackage = pkgs.stdenv.mkDerivation {
|
||||||
devShell = import ./shell.nix { inherit pkgs; };
|
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