Created
September 25, 2019 21:40
-
-
Save timstott/74caac776c7f6f9ccb21da6589397f6f to your computer and use it in GitHub Desktop.
Ruby project nix shell
This file contains hidden or 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; | |
mkShell { | |
name = "hello-world-ruby-v1"; | |
buildInputs = [ | |
ruby_2_6 | |
]; | |
shellHook = '' | |
mkdir -p .nix-gems | |
export GEM_HOME=$PWD/.nix-gems/$(ruby -e "puts RUBY_VERSION") | |
export GEM_PATH=$GEM_HOME | |
export PATH=$GEM_HOME/bin:$PATH | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment