Skip to content

Instantly share code, notes, and snippets.

@thefloweringash
Created January 22, 2020 06:02
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 thefloweringash/9882f775aadfa7b16daee58091bfadc7 to your computer and use it in GitHub Desktop.
Save thefloweringash/9882f775aadfa7b16daee58091bfadc7 to your computer and use it in GitHub Desktop.
bundlerEnv ruby2.7 test case
# frozen_string_literal: true
source "https://rubygems.org"
gem "thor"
GEM
remote: https://rubygems.org/
specs:
thor (1.0.1)
PLATFORMS
ruby
DEPENDENCIES
thor
BUNDLED WITH
1.17.2
{
thor = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1xbhkmyhlxwzshaqa7swy2bx6vd64mm0wrr8g3jywvxy7hg0cwkm";
type = "gem";
};
version = "1.0.1";
};
}
{ rubyAttr ? "ruby_2_7" }:
let
pkgs = import <nixpkgs> {};
bundlerEnv = pkgs.bundlerEnv.override {
bundler = pkgs.bundler.override {
ruby = pkgs."${rubyAttr}";
};
};
in
bundlerEnv {
pname = "thor";
ruby = pkgs."${rubyAttr}";
gemdir = ./.;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment