buildRubyGem: fix bundix cross
allows building bundix but most ruby gems still fail with ``` ++ gem install --local --force --http-proxy http://nodtd.invalid --ignore-dependencies --install-dir /nix/store/...-ruby-aarch64-unknown-linux-gnu2.7.6-nio4r-2.5.8-aarch64-unknown-linux-gnu/lib/ruby/gems/2.7.0 --build-root / --backtrace --no-env-shebang -N /nix/store/...-nio4r-2.5.8.gem -- /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 8: require: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 9: require: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 10: require: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 12: required_version: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 14: unless: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 15: abort: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 16: end: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 18: args: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 20: begin: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 21: Gem::GemRunner.new.run: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 22: rescue: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 23: exit: e.exit_code: numeric argument required ```
This commit is contained in:
parent
5a188dfbca
commit
a720bc44c2
|
@ -35,6 +35,7 @@ lib.makeOverridable (
|
|||
, namePrefix ? (let
|
||||
rubyName = builtins.parseDrvName ruby.name;
|
||||
in "${rubyName.name}${rubyName.version}-")
|
||||
, nativeBuildInputs ? []
|
||||
, buildInputs ? []
|
||||
, meta ? {}
|
||||
, patches ? []
|
||||
|
@ -87,11 +88,15 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // {
|
|||
inherit dontStrip;
|
||||
inherit type;
|
||||
|
||||
buildInputs = [
|
||||
nativeBuildInputs = [
|
||||
ruby makeWrapper
|
||||
] ++ lib.optionals (type == "git") [ gitMinimal ]
|
||||
++ lib.optionals (type != "gem") [ bundler ]
|
||||
++ lib.optional stdenv.isDarwin darwin.libobjc
|
||||
++ nativeBuildInputs;
|
||||
|
||||
buildInputs = [
|
||||
ruby
|
||||
] ++ lib.optionals stdenv.isDarwin [ darwin.libobjc ]
|
||||
++ buildInputs;
|
||||
|
||||
#name = builtins.trace (attrs.name or "no attr.name" ) "${namePrefix}${gemName}-${version}";
|
||||
|
|
Loading…
Reference in a new issue