1
{
2
outputs = {
3
self,
4
nixpkgs,
5
flake-utils,
6
}:
7
flake-utils.lib.eachDefaultSystem (system: let
8
pkgs = import nixpkgs {inherit system;};
9
inherit (pkgs) ruby;
10
in {
11
formatter = pkgs.alejandra;
12
13
devShells.default = let
14
env = pkgs.bundlerEnv {
15
name = "notes-bundler-env";
16
inherit ruby;
17
gemfile = ./Gemfile;
18
lockfile = ./Gemfile.lock;
19
# Hacks in platforms for commonmarker and nokogiri per
20
# https://github.com/nix-community/bundix/issues/71.
21
gemset =
22
import ./gemset.nix
23
// (
24
if pkgs.stdenv.isDarwin
25
then import ./gemset-darwin.nix
26
else import ./gemset-linux.nix
27
);
28
};
29
in
30
pkgs.mkShell {
31
name = "notes";
32
buildInputs = [
33
ruby
34
env
35
];
36
};
37
});
38
}
39