Skip to content

Commit

Permalink
Set up shell for Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
camelpunch committed Oct 10, 2024
1 parent c2abd89 commit ecfac92
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,29 @@

outputs = { self, nixpkgs }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
forAllSystems = function:
nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-darwin"
]
(system: function nixpkgs.legacyPackages.${system});
in
{
devShells.x86_64-linux.default = with pkgs; mkShell {
packages = [
elixir_1_17
(elixir_ls.override { elixir = elixir_1_17; })
inotify-tools
qpdf
];
devShells = forAllSystems (pkgs: {
default = with pkgs; mkShell {
packages = [
elixir_1_17
(elixir_ls.override { elixir = elixir_1_17; })
qpdf
]
++ lib.lists.optional stdenv.isLinux inotify-tools
++ lib.lists.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreServices;

shellHook = ''
export ERL_AFLAGS="-kernel shell_history enabled shell_history_file_bytes 1024000"
export FONT_LIBRE_BODONI_REGULAR="${libre-bodoni}/share/fonts/opentype/LibreBodoni-Regular.otf"
'';
};
shellHook = ''
export ERL_AFLAGS="-kernel shell_history enabled shell_history_file_bytes 1024000"
export FONT_LIBRE_BODONI_REGULAR="${libre-bodoni}/share/fonts/opentype/LibreBodoni-Regular.otf"
'';
};
});
};
}

0 comments on commit ecfac92

Please sign in to comment.