bundler-env: Gemfile.lock is frozen
This commit is contained in:
parent
551296a1ce
commit
fe87240e68
@ -40,12 +40,6 @@ let
|
|||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp ${gemfile} $out/Gemfile
|
cp ${gemfile} $out/Gemfile
|
||||||
cp ${lockfile} $out/Gemfile.lock
|
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;
|
envPaths = lib.attrValues gems ++ lib.optional (!hasBundler) bundler;
|
||||||
bundlerEnv = buildEnv {
|
bundlerEnv = buildEnv {
|
||||||
@ -72,6 +66,7 @@ let
|
|||||||
makeWrapper "$i" $out/bin/$(basename "$i") \
|
makeWrapper "$i" $out/bin/$(basename "$i") \
|
||||||
--set BUNDLE_GEMFILE ${confFiles}/Gemfile \
|
--set BUNDLE_GEMFILE ${confFiles}/Gemfile \
|
||||||
--set BUNDLE_PATH ${bundlerEnv}/${ruby.gemPath} \
|
--set BUNDLE_PATH ${bundlerEnv}/${ruby.gemPath} \
|
||||||
|
--set BUNDLE_FROZEN 1 \
|
||||||
--set GEM_HOME ${bundlerEnv}/${ruby.gemPath} \
|
--set GEM_HOME ${bundlerEnv}/${ruby.gemPath} \
|
||||||
--set GEM_PATH ${bundlerEnv}/${ruby.gemPath}
|
--set GEM_PATH ${bundlerEnv}/${ruby.gemPath}
|
||||||
done
|
done
|
||||||
|
@ -31,6 +31,7 @@ paths.each do |path|
|
|||||||
|
|
||||||
ENV["BUNDLE_GEMFILE"] = "#{gemfile}"
|
ENV["BUNDLE_GEMFILE"] = "#{gemfile}"
|
||||||
ENV["BUNDLE_PATH"] = "#{bundle_path}"
|
ENV["BUNDLE_PATH"] = "#{bundle_path}"
|
||||||
|
ENV['BUNDLE_FROZEN'] = '1'
|
||||||
|
|
||||||
Gem.use_paths("#{bundler_gem_path}", ENV["GEM_PATH"])
|
Gem.use_paths("#{bundler_gem_path}", ENV["GEM_PATH"])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user