From 814938a7ce2d9bd25c90065fdde6c98c1e389c5c Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 4 May 2018 19:56:38 +0200 Subject: [PATCH] ruby: fix darwin dependencies --- pkgs/development/interpreters/ruby/default.nix | 15 +++++++-------- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index b98e2c1a6739..89d394c87569 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -1,8 +1,8 @@ { stdenv, buildPackages, lib , fetchurl, fetchpatch, fetchFromSavannah, fetchFromGitHub , zlib, openssl, gdbm, ncurses, readline, groff, libyaml, libffi, autoreconfHook, bison -, autoconf, darwin ? null -, buildEnv, bundler, bundix, Foundation +, autoconf, libiconv, libobjc, libunwind, Foundation +, buildEnv, bundler, bundix } @ args: let @@ -37,7 +37,7 @@ let isRuby25 = ver.majMin == "2.5"; baseruby = self.override { useRailsExpress = false; }; self = lib.makeOverridable ( - { stdenv, buildPackages, lib + { stdenv, buildPackages, lib , fetchurl, fetchpatch, fetchFromSavannah, fetchFromGitHub , useRailsExpress ? true , zlib, zlibSupport ? true @@ -48,8 +48,8 @@ let , libyaml, yamlSupport ? true , libffi, fiddleSupport ? true , autoreconfHook, bison, autoconf - , darwin ? null - , buildEnv, bundler, bundix, Foundation + , buildEnv, bundler, bundix + , libiconv, libobjc, libunwind, Foundation }: let rubySrc = if useRailsExpress then fetchFromGitHub { @@ -93,9 +93,8 @@ let # support is not enabled, so add readline to the build inputs if curses # support is disabled (if it's enabled, we already have it) and we're # running on darwin - ++ (op (!cursesSupport && stdenv.isDarwin) readline) - ++ (op (isRuby25 && stdenv.isDarwin) Foundation) - ++ (ops stdenv.isDarwin (with darwin; [ libiconv libobjc libunwind ])); + ++ op (!cursesSupport && stdenv.isDarwin) readline + ++ ops stdenv.isDarwin [ libiconv libobjc libunwind Foundation ]; enableParallelBuilding = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d1c4e2e09a84..206873d8e292 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7355,7 +7355,10 @@ with pkgs; bundlerEnv = callPackage ../development/ruby-modules/bundler-env { }; bundlerApp = callPackage ../development/ruby-modules/bundler-app { }; - inherit (callPackage ../development/interpreters/ruby { inherit (darwin.apple_sdk.frameworks) Foundation; }) + inherit (callPackage ../development/interpreters/ruby { + inherit (darwin) libiconv libobjc libunwind; + inherit (darwin.apple_sdk.frameworks) Foundation; + }) ruby_2_3 ruby_2_4 ruby_2_5;