portfolio/flake.nix

51 lines
1.2 KiB
Nix
Raw Normal View History

2023-12-13 22:32:55 +00:00
{
description = ''
An opinionated jekyll flake.
2023-12-13 22:32:55 +00:00
To generate a copy of this template elsewhere, install
[bootstrap](https://github.com/jrpotter/bootstrap) and run:
```bash
$ bootstrap jekyll
2023-12-13 22:32:55 +00:00
```
'';
inputs = {
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
gems = pkgs.bundlerEnv {
name = "portfolio-gems";
gemdir = ./.;
ruby = pkgs.ruby_3_2;
};
2023-12-13 22:32:55 +00:00
in
{
packages = {
app = pkgs.stdenv.mkDerivation {
name = "portfolio";
buildInputs = [ gems gems.wrappedRuby ];
2023-12-13 22:32:55 +00:00
src = ./.;
version = "0.1.0";
2024-01-10 19:24:52 +00:00
installPhase = "JEKYLL_ENV=production jekyll b -d $out";
2023-12-13 22:32:55 +00:00
};
2023-12-14 16:11:07 +00:00
default = self.packages.${system}.app;
2023-12-13 22:32:55 +00:00
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
bundix
gems
gems.wrappedRuby
2023-12-13 22:32:55 +00:00
];
};
}
);
2023-12-13 22:32:55 +00:00
}