Last active
September 26, 2018 21:08
-
-
Save ejpcmac/afb00d15e1bc5784dc9e3fb485ca144e to your computer and use it in GitHub Desktop.
Shell for Nerves projects
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; | |
in | |
mkShell { | |
buildInputs = [ elixir git fwup squashfsTools file ] | |
++ optional stdenv.isDarwin coreutils-prefixed # For Nerves on macOS. | |
++ optional stdenv.isLinux x11_ssh_askpass; # For Nerves on Linux. | |
# This hook is needed on Linux to make Nerves use the correct ssh_askpass. | |
shellHooks = optional stdenv.isLinux '' | |
export SUDO_ASKPASS=${x11_ssh_askpass}/libexec/x11-ssh-askpass | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment