Reformat all projects; switch to overlay format
This commit is contained in:
parent
bf45826289
commit
fca8041d90
30 changed files with 532 additions and 600 deletions
|
@ -6,32 +6,27 @@
|
|||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, flake-utils, nixpkgs }:
|
||||
outputs =
|
||||
{ self
|
||||
, flake-utils
|
||||
, nixpkgs
|
||||
}:
|
||||
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = (with pkgs; [ elixir ]) ++
|
||||
pkgs.lib.optionals (pkgs.stdenv.isLinux) (with pkgs; [ gigalixir inotify-tools libnotify ]) ++ # Linux only
|
||||
pkgs.lib.optionals (pkgs.stdenv.isDarwin) (with pkgs; [ terminal-notifier ]) ++ # macOS only
|
||||
(with pkgs.darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]);
|
||||
|
||||
inherit (pkgs)
|
||||
darwin gigalixir inotify-tools libnotify mkShell terminal-notifier;
|
||||
inherit (pkgs.beam.packages.erlangR25) elixir elixir_ls;
|
||||
inherit (pkgs.darwin.apple_sdk.frameworks) CoreFoundation CoreServices;
|
||||
inherit (pkgs.lib) optionals;
|
||||
inherit (pkgs.stdenv) isDarwin isLinux;
|
||||
|
||||
linuxDeps = optionals isLinux [ gigalixir inotify-tools libnotify ];
|
||||
darwinDeps = optionals isDarwin [ terminal-notifier ]
|
||||
++ [ CoreFoundation CoreServices ];
|
||||
in
|
||||
{
|
||||
devShells = {
|
||||
default = mkShell {
|
||||
buildInputs = [ elixir elixir_ls ] ++ linuxDeps ++ darwinDeps;
|
||||
|
||||
shellHook = ''
|
||||
${elixir}/bin/mix --version
|
||||
${elixir}/bin/iex --version
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
shellHook = ''
|
||||
${pkgs.elixir}/bin/mix --version
|
||||
${pkgs.elixir}/bin/iex --version
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue