diff --git a/pkgs/development/ruby-modules/bundler-env/default.nix b/pkgs/development/ruby-modules/bundler-env/default.nix index d5e2154ab3b3..597acc25b30d 100644 --- a/pkgs/development/ruby-modules/bundler-env/default.nix +++ b/pkgs/development/ruby-modules/bundler-env/default.nix @@ -40,12 +40,6 @@ let mkdir -p $out cp ${gemfile} $out/Gemfile cp ${lockfile} $out/Gemfile.lock - - cd $out - chmod +w Gemfile.lock - export GEM_PATH=${bundler}/${ruby.gemPath} - ${ruby}/bin/ruby -rubygems -e \ - "require 'bundler'; Bundler.definition.lock('Gemfile.lock')" ''; envPaths = lib.attrValues gems ++ lib.optional (!hasBundler) bundler; bundlerEnv = buildEnv { @@ -72,6 +66,7 @@ let makeWrapper "$i" $out/bin/$(basename "$i") \ --set BUNDLE_GEMFILE ${confFiles}/Gemfile \ --set BUNDLE_PATH ${bundlerEnv}/${ruby.gemPath} \ + --set BUNDLE_FROZEN 1 \ --set GEM_HOME ${bundlerEnv}/${ruby.gemPath} \ --set GEM_PATH ${bundlerEnv}/${ruby.gemPath} done diff --git a/pkgs/development/ruby-modules/bundler-env/gen-bin-stubs.rb b/pkgs/development/ruby-modules/bundler-env/gen-bin-stubs.rb index fa77682cfd59..8609a863e50e 100644 --- a/pkgs/development/ruby-modules/bundler-env/gen-bin-stubs.rb +++ b/pkgs/development/ruby-modules/bundler-env/gen-bin-stubs.rb @@ -31,6 +31,7 @@ paths.each do |path| ENV["BUNDLE_GEMFILE"] = "#{gemfile}" ENV["BUNDLE_PATH"] = "#{bundle_path}" +ENV['BUNDLE_FROZEN'] = '1' Gem.use_paths("#{bundler_gem_path}", ENV["GEM_PATH"])