Created
September 28, 2018 12:14
-
-
Save ejpcmac/336799cfe3ed7f0a82cc674712e22166 to your computer and use it in GitHub Desktop.
Shell for Phoenix projects with node.js and PostgreSQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
let | |
inherit (lib) optional optionals; | |
elixir = beam.packages.erlangR21.elixir_1_7; | |
nodejs = nodejs-10_x; | |
postgresql = postgresql100; | |
in | |
mkShell { | |
buildInputs = [ elixir nodejs git postgresql ] | |
++ optional stdenv.isLinux inotify-tools # For file_system on Linux. | |
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ | |
# For file_system on macOS. | |
CoreFoundation | |
CoreServices | |
]); | |
# Put the PostgreSQL databases in the project diretory. | |
shellHook = '' | |
export PGDATA="$PWD/db" | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment