Created
April 8, 2025 12:41
-
-
Save mgreenly/60642c951123da4287acfa603a152eba to your computer and use it in GitHub Desktop.
simple ruby shell.nix
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
let | |
tarball = fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/24.11.tar.gz"; | |
pkgs = import tarball { config = {}; overlays = []; }; | |
in | |
pkgs.mkShell { | |
packages = with pkgs; [ | |
nodejs | |
ruby | |
]; | |
nativeBuildInputs = with pkgs; [ | |
pkg-config | |
libyaml | |
postgresql | |
mariadb | |
]; | |
shellHook = with pkgs; '' | |
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"; | |
export PS1='\[\e[93;1;2m\]nix-shell@\W\[\e[0m\]\\$ ' | |
export GEM_HOME=$PWD/.nix-gems | |
export GEM_PATH=$PWD/.nix-gems:${ruby}/${ruby.gemPath} | |
export PATH=$PWD/.nix-gems/bin:$PATH | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment