Created
October 29, 2019 20:34
-
-
Save emptyflask/99f310df9fadd8419571599ce25eed88 to your computer and use it in GitHub Desktop.
ruby 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
import ( builtins.fetchGit { | |
name = "nixpkgs-2019-08-25"; | |
url = https://github.com/nixos/nixpkgs/; | |
rev = "8d1510abfb592339e13ce8f6db6f29c1f8b72924"; | |
}) { | |
config = { | |
allowUnfree = true; | |
}; | |
} |
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, bundlerEnv, ...}: | |
with pkgs; | |
bundlerEnv { | |
inherit ruby_2_6; | |
name = "chronos-env"; | |
gemdir = ../.; | |
groups = ["default" "development" "production" "test" "mover" "toolbox"]; | |
gemConfig.openssl = attrs: { | |
buildInputs = [ openssl ]; | |
}; | |
gemConfig.pg = attrs: { | |
buildInputs = [ postgresql_9_6 ]; | |
}; | |
gemConfig.nokogiri = attrs: { | |
buildInputs = [ libiconv zlib ]; | |
}; | |
gemConfig.sassc = attrs: { | |
buildInputs = [ libsass ]; | |
shellHook = '' | |
export SASS_LIBSASS_PATH=${libsass} | |
''; | |
}; | |
} |
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 ./nix/config.nix }: | |
let | |
rubyenv = import ./nix/rubyenv.nix; | |
in pkgs.mkShell { | |
buildInputs = with pkgs; [ | |
bundix | |
bundler | |
circleci-cli | |
elasticsearch5 | |
libxml2 | |
nodejs | |
postgresql_9_6 | |
rubyenv | |
rubyenv.wrappedRuby | |
solargraph | |
yarn | |
]; | |
} |
I don't think I've seen that error before with this configuration, but I'd recommend taking a look at https://github.com/emptyflask/rails-nix for some more up-to-date code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you get this working? I seem to get a
error: cannot coerce a function to a string, at /nix/store/278sb96d8sm0my75msa6mihis2jgh2ls-nixpkgs-2019-08-25/pkgs/build-support/mkshell/default.nix:28:3
message when runningnix-shell shell.nix