forked from mirrors/nixpkgs
Merge pull request #14653 from manveru/bundler-env-frozen
bundler-env: Gemfile.lock is frozen
This commit is contained in:
commit
12e919bb34
|
@ -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
|
||||
|
|
|
@ -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"])
|
||||
|
||||
|
|
Loading…
Reference in a new issue