Merge pull request #161298 from bergkvist/macos-shebang
ruby-modules/bundler-env: Replace makeWrapper with makeBinaryWrapper to make bundled ruby apps work on macOS
This commit is contained in:
commit
09477e8a64
@ -1,6 +1,6 @@
|
||||
{ stdenv, runCommand, ruby, lib, rsync
|
||||
, defaultGemConfig, buildRubyGem, buildEnv
|
||||
, makeWrapper
|
||||
, makeBinaryWrapper
|
||||
, bundler
|
||||
}@defs:
|
||||
|
||||
@ -118,9 +118,12 @@ let
|
||||
|
||||
wrappedRuby = stdenv.mkDerivation {
|
||||
name = "wrapped-ruby-${pname'}";
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
inherit (ruby) gemPath meta;
|
||||
buildCommand = ''
|
||||
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p $out/bin
|
||||
for i in ${ruby}/bin/*; do
|
||||
makeWrapper "$i" $out/bin/$(basename "$i") \
|
||||
@ -131,6 +134,15 @@ let
|
||||
--set GEM_PATH ${basicEnv}/${ruby.gemPath}
|
||||
done
|
||||
'';
|
||||
|
||||
dontInstall = true;
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
$out/bin/ruby --help > /dev/null
|
||||
'';
|
||||
|
||||
inherit (ruby) meta;
|
||||
};
|
||||
|
||||
env = let
|
||||
|
Loading…
Reference in New Issue
Block a user