3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development
Samuel Dionne-Riel 6638690261 ruby: Use hostPlatform
Using `stdenv.targetPlatform` gives the wrong platform in buildPackages.

E.g.:

```
 $ nix-diff --color never $(env -i nix-instantiate -A pkgs.ruby -A pkgs.pkgsCross.aarch64-multiplatform.buildPackages.ruby)
- /nix/store/w8wk99p4gadns35n2l0fr7wx56jlwnnx-ruby-2.6.6.drv:{out}
+ /nix/store/5ywj7nicjai6ji4g33yh6nvz1b5fq7xw-ruby-2.6.6.drv:{out}
• The input named `ruby-2.6.6` differs
  - /nix/store/4a6nag89dcxwdf32820z6dfwwpfgab8s-ruby-2.6.6.drv:{out}
  + /nix/store/40pakkdfv578zffx3y11qd5ckcp2xpzm-ruby-2.6.6.drv:{out}
  • The environments do not match:
      postInstall=''
          # Remove unnecessary groff reference from runtime closure, since it's big
          sed -i '/NROFF/d' $out/lib/ruby/*/*/rbconfig.rb

          # Bundler tries to create this directory
          mkdir -p $out/nix-support
          cat > $out/nix-support/setup-hook <<EOF
          addGemPath() {
            addToSearchPath GEM_PATH \$1/lib/ruby/gems/2.6.0
          }
          addRubyLibPath() {
            addToSearchPath RUBYLIB \$1/lib/ruby/site_ruby
            addToSearchPath RUBYLIB \$1/lib/ruby/site_ruby/2.6.0
            addToSearchPath RUBYLIB \$1/lib/ruby/site_ruby/2.6.0/←x86_←→aarch→64-linux
          }

          addEnvHooks "$hostOffset" addGemPath
          addEnvHooks "$hostOffset" addRubyLibPath
          EOF

          rbConfig=$(find $out/lib/ruby -name rbconfig.rb)
      ''
• Skipping environment comparison
```

`pkgs.pkgsCros.*.buildPackage.ruby` should be equivalent to `pkgs.ruby`.
It wasn't.
2021-03-06 22:30:55 -05:00
..
androidndk-pkgs
arduino
beam-modules
bower-modules/generic
chez-modules
compilers pkgs/development/compilers/ocaml: remove 3.* expressions 2021-03-02 15:41:17 +01:00
coq-modules
dhall-modules
dotnet-modules
em-modules/generic
go-modules
go-packages
guile-modules
haskell-modules
idris-modules
interpreters ruby: Use hostPlatform 2021-03-06 22:30:55 -05:00
java-modules
libraries Merge pull request #114926 from helsinki-systems/jsoncpp-py 2021-03-02 21:15:08 -05:00
lisp-modules
lua-modules
misc
mobile
node-packages rust-analyzer: 2021-02-22 -> 2021-03-01 2021-03-01 12:21:10 +01:00
ocaml-modules ocamlPackages.mirage-clock: use Dune 2 2021-03-02 20:50:55 +01:00
octave-modules
perl-modules
pharo
php-packages php73Packages.phpstan: 0.12.78 -> 0.12.79 2021-03-01 23:51:15 +00:00
pure-modules
python-modules Merge pull request #114916 from mweinelt/python/clldutils 2021-03-03 04:48:42 +01:00
r-modules
ruby-modules
tools Merge pull request #114861 from NeQuissimus/sbtextras 2021-03-02 17:39:40 +01:00
web cypress: from 6.0.0 to 6.5.0 2021-03-02 21:59:16 +01:00