erambler/flake.nix

31 lines
843 B
Nix

{
description = "A very basic flake";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
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
];
};
});
}