{ inputs = { nixpkgs.url = "github:nixos/nixpkgs"; utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, utils, }: (utils.lib.eachDefaultSystem ( system: let pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; }; in { formatter = pkgs.nixfmt-rfc-style; packages.default = pkgs.artemist-blog; shells.default = pkgs.mkShell { buildInputs = pkgs.artemist-blog.buildInputs ++ (with pkgs; [ bundix ]); }; } )) // { overlays.default = final: prev: { artemist-blog = let jekyllEnv = final.bundlerEnv { name = "artemist-blog-env"; inherit (final) ruby; gemfile = ./Gemfile; lockfile = ./Gemfile.lock; gemset = ./gemset.nix; }; in final.stdenv.mkDerivation { name = "artemist-blog"; src = ./.; buildInputs = with final; [ jekyllEnv ]; buildPhase = '' bundle exec jekyll build ''; installPhase = '' cp -r _site $out ''; }; }; }; }