Skip to content

Instantly share code, notes, and snippets.

@timstott
Created September 25, 2019 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timstott/74caac776c7f6f9ccb21da6589397f6f to your computer and use it in GitHub Desktop.
Save timstott/74caac776c7f6f9ccb21da6589397f6f to your computer and use it in GitHub Desktop.
Ruby project nix shell
{ 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