Small fixes to Elixir env

This commit is contained in:
Luc Perkins 2022-07-29 00:58:11 +02:00
parent 5c8654b089
commit c06ee195ac
No known key found for this signature in database
GPG key ID: 4F102D0C16E232F2

View file

@ -11,19 +11,23 @@
let
pkgs = import nixpkgs { inherit system; };
inherit (pkgs) darwin inotify-tools mkShell nodejs-18_x terminal-notifier;
inherit (pkgs.beam.packages.erlangR25) elixir;
inherit (pkgs)
darwin inotify-tools mkShell nodejs-18_x terminal-notifier;
inherit (pkgs.beam.packages.erlangR25) elixir elixir_ls;
inherit (pkgs.lib) optionals;
inherit (pkgs.stdenv) isDarwin isLinux;
linuxDeps = optionals isLinux
[ inotify-tools ];
darwinDeps = optionals isDarwin
[ terminal-notifier ] ++ (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]);
linuxDeps = optionals isLinux [ inotify-tools ];
darwinDeps = optionals isDarwin [ terminal-notifier ]
++ (with darwin.apple_sdk.frameworks; [
CoreFoundation
CoreServices
]);
in {
devShells = {
default = mkShell {
buildInputs = [ elixir nodejs-18_x ] ++ linuxDeps ++ darwinDeps;
buildInputs = [ elixir elixir_ls nodejs-18_x ] ++ linuxDeps
++ darwinDeps;
shellHook = ''
${elixir}/bin/mix --version