diff options
Diffstat (limited to 'pkgs/development/ruby-modules')
3 files changed, 14 insertions, 15 deletions
diff --git a/pkgs/development/ruby-modules/bundled-common/functions.nix b/pkgs/development/ruby-modules/bundled-common/functions.nix index a093cc4dc95..35307a3fbd9 100644 --- a/pkgs/development/ruby-modules/bundled-common/functions.nix +++ b/pkgs/development/ruby-modules/bundled-common/functions.nix @@ -64,7 +64,7 @@ in rec { "${ruby}/bin/ruby" \ "${confFiles}/Gemfile" \ "$out/${ruby.gemPath}" \ - "${bundler}/${ruby.gemPath}" \ + "${bundler}/${ruby.gemPath}/gems/bundler-${bundler.version}" \ ${lib.escapeShellArg binPaths} \ ${lib.escapeShellArg groups} ''; diff --git a/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb b/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb index fe8c43f55ed..add5db56d1d 100644 --- a/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb +++ b/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb @@ -8,7 +8,7 @@ out = ENV["out"] ruby = ARGV[0] gemfile = ARGV[1] bundle_path = ARGV[2] -bundler_gem_path = ARGV[3] +bundler_path = ARGV[3] paths = ARGV[4].split groups = ARGV[5].split @@ -35,7 +35,7 @@ ENV["BUNDLE_GEMFILE"] = #{gemfile.dump} ENV["BUNDLE_PATH"] = #{bundle_path.dump} ENV['BUNDLE_FROZEN'] = '1' -Gem.use_paths(#{bundler_gem_path.dump}, ENV["GEM_PATH"]) +$LOAD_PATH.unshift #{bundler_path.dump} + "/lib" require 'bundler' Bundler.setup(#{groups.map(&:dump).join(', ')}) diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 5a3b3140efd..c1eb82c5fa8 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -236,7 +236,7 @@ in nativeBuildInputs = [ pkgconfig ]; buildInputs = [ openssl ]; hardeningDisable = [ "format" ]; - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = toString [ "-Wno-error=stringop-overflow" "-Wno-error=implicit-fallthrough" "-Wno-error=sizeof-pointer-memaccess" @@ -496,23 +496,22 @@ in sassc = attrs: { nativeBuildInputs = [ rake ]; dontBuild = false; - SASS_LIBSASS_PATH = libsass; + SASS_LIBSASS_PATH = toString libsass; postPatch = '' substituteInPlace lib/sassc/native.rb \ --replace 'gem_root = spec.gem_dir' 'gem_root = File.join(__dir__, "../../")' ''; - } // (if stdenv.isDarwin then { + } // (lib.optionalAttrs stdenv.isDarwin { # https://github.com/NixOS/nixpkgs/issues/19098 - buildFlags = "--disable-lto"; - } else {}); + buildFlags = [ "--disable-lto" ]; + }); - scrypt = attrs: - if stdenv.isDarwin then { - dontBuild = false; - postPatch = '' - sed -i -e "s/-arch i386//" Rakefile ext/scrypt/Rakefile - ''; - } else {}; + scrypt = attrs: lib.optionalAttrs stdenv.isDarwin { + dontBuild = false; + postPatch = '' + sed -i -e "s/-arch i386//" Rakefile ext/scrypt/Rakefile + ''; + }; semian = attrs: { buildInputs = [ openssl ]; |