From cf8f4963a7700fefdce40839ac21964a8c10f2a0 Mon Sep 17 00:00:00 2001 From: Charles Strahan Date: Sun, 9 Nov 2014 22:16:58 +0000 Subject: [PATCH] rename rubyLibs to rubyPackages --- .../version-management/git-and-tools/default.nix | 2 +- .../version-management/redmine/bootstrap.nix | 2 +- .../version-management/redmine/default.nix | 4 ++-- pkgs/development/interpreters/ruby/packages.nix | 11 +++++++++++ pkgs/development/libraries/xapian/bindings/1.0.x.nix | 2 +- .../development/libraries/xapian/bindings/default.nix | 2 +- pkgs/development/tools/vagrant/default.nix | 4 ++-- pkgs/misc/misc.nix | 2 +- pkgs/servers/consul/default.nix | 6 +++--- pkgs/tools/audio/mpdcron/default.nix | 4 ++-- pkgs/tools/package-management/gem-nix/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 10 ++++++---- pkgs/top-level/python-packages.nix | 2 +- 13 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 pkgs/development/interpreters/ruby/packages.nix diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix index 4cabe3a4e2ab..b90829c3330d 100644 --- a/pkgs/applications/version-management/git-and-tools/default.nix +++ b/pkgs/applications/version-management/git-and-tools/default.nix @@ -73,7 +73,7 @@ rec { }; hub = import ./hub { - inherit (rubyLibs) rake; + inherit (rubyPackages) rake; inherit stdenv fetchurl groff makeWrapper; }; diff --git a/pkgs/applications/version-management/redmine/bootstrap.nix b/pkgs/applications/version-management/redmine/bootstrap.nix index 4b4359603c9b..7bb9e2684976 100644 --- a/pkgs/applications/version-management/redmine/bootstrap.nix +++ b/pkgs/applications/version-management/redmine/bootstrap.nix @@ -14,7 +14,7 @@ in stdenv.mkDerivation rec { sha256 = "0x0zwxyj4dwbk7l64s3lgny10mjf0ba8jwrbafsm4d72sncmacv0"; }; buildInputs = [ - ruby rubyLibs.bundler libiconv libxslt libxml2 pkgconfig + ruby rubyPackages.bundler libiconv libxslt libxml2 pkgconfig libffi imagemagickBig postgresql which stdenv ]; installPhase = '' diff --git a/pkgs/applications/version-management/redmine/default.nix b/pkgs/applications/version-management/redmine/default.nix index 4655a16671ee..22fe6ba5be02 100644 --- a/pkgs/applications/version-management/redmine/default.nix +++ b/pkgs/applications/version-management/redmine/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ruby, rubyLibs, libiconv, libxslt, libxml2, pkgconfig, libffi, imagemagickBig, postgresql }: +{ stdenv, fetchurl, ruby, rubyPackages, libiconv, libxslt, libxml2, pkgconfig, libffi, imagemagickBig, postgresql }: let gemspec = map (gem: fetchurl { url=gem.url; sha256=gem.hash; }) (import ./Gemfile.nix); @@ -25,7 +25,7 @@ in stdenv.mkDerivation rec { ''; buildInputs = [ - ruby rubyLibs.bundler libiconv libxslt libxml2 pkgconfig libffi + ruby rubyPackages.bundler libiconv libxslt libxml2 pkgconfig libffi imagemagickBig postgresql ]; diff --git a/pkgs/development/interpreters/ruby/packages.nix b/pkgs/development/interpreters/ruby/packages.nix new file mode 100644 index 000000000000..a35ccae64191 --- /dev/null +++ b/pkgs/development/interpreters/ruby/packages.nix @@ -0,0 +1,11 @@ +{ ruby, rubygemsFun, callPackage }: + +{ + # Nix utilities + gemFixes = callPackage ../development/interpreters/ruby/fixes.nix { }; + buildRubyGem = callPackage ../development/interpreters/ruby/gem.nix { inherit ruby; }; + loadRubyEnv = callPackage ../development/interpreters/ruby/load-ruby-env.nix { inherit ruby; }; + + # Gems + rubygems = rubygemsFun ruby; +} diff --git a/pkgs/development/libraries/xapian/bindings/1.0.x.nix b/pkgs/development/libraries/xapian/bindings/1.0.x.nix index 9ce5312f69ab..2d44542e8fd8 100644 --- a/pkgs/development/libraries/xapian/bindings/1.0.x.nix +++ b/pkgs/development/libraries/xapian/bindings/1.0.x.nix @@ -42,7 +42,7 @@ composableDerivation.composableDerivation {} rec { name = "ruby"; enable = { buildInputs = [ ruby ]; - # export same env vars as in rubyLibs + # export same env vars as in rubyPackages preConfigure = '' export RUBY_LIB=$out/${ruby.libPath} export RUBY_LIB_ARCH=$RUBY_LIB diff --git a/pkgs/development/libraries/xapian/bindings/default.nix b/pkgs/development/libraries/xapian/bindings/default.nix index 789d9a65308a..8c1a4069748a 100644 --- a/pkgs/development/libraries/xapian/bindings/default.nix +++ b/pkgs/development/libraries/xapian/bindings/default.nix @@ -42,7 +42,7 @@ composableDerivation.composableDerivation {} rec { name = "ruby"; enable = { buildInputs = [ ruby ]; - # export same env vars as in rubyLibs + # export same env vars as in rubyPackages preConfigure = '' export RUBY_LIB=$out/${ruby.libPath} export RUBY_LIB_ARCH=$RUBY_LIB diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix index bd9ccf4947ba..602d95076a4e 100644 --- a/pkgs/development/tools/vagrant/default.nix +++ b/pkgs/development/tools/vagrant/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, dpkg, curl, libarchive, openssl, ruby, rubyLibs, libiconv +{ stdenv, fetchurl, dpkg, curl, libarchive, openssl, ruby, rubyPackages, libiconv , libxml2, libxslt }: assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux"; @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { ln -s ${ruby}/bin/erb opt/vagrant/embedded/bin ln -s ${ruby}/bin/gem opt/vagrant/embedded/bin ln -s ${ruby}/bin/irb opt/vagrant/embedded/bin - ln -s ${rubyLibs.rake}/bin/rake opt/vagrant/embedded/bin + ln -s ${rubyPackages.rake}/bin/rake opt/vagrant/embedded/bin ln -s ${ruby}/bin/rdoc opt/vagrant/embedded/bin ln -s ${ruby}/bin/ri opt/vagrant/embedded/bin ln -s ${ruby}/bin/ruby opt/vagrant/embedded/bin diff --git a/pkgs/misc/misc.nix b/pkgs/misc/misc.nix index 87be974ca969..6357c4e6f905 100644 --- a/pkgs/misc/misc.nix +++ b/pkgs/misc/misc.nix @@ -16,7 +16,7 @@ in packageOverrides = { rubyCollection = collection { name = "ruby"; - list = let l = rubyLibs; in + list = let l = rubyPackages; in [ pkgs.ruby l.chronic l.sup ]; }; } diff --git a/pkgs/servers/consul/default.nix b/pkgs/servers/consul/default.nix index 9244ee2f2cf5..fdde367f7eb7 100644 --- a/pkgs/servers/consul/default.nix +++ b/pkgs/servers/consul/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, go, fetchgit, fetchhg, fetchbzr, fetchFromGitHub -, ruby, rubyLibs, nodejs }: +, ruby, rubyPackages, nodejs }: let version = "0.4.0"; @@ -13,10 +13,10 @@ stdenv.mkDerivation { inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub; }; - buildInputs = [ go ruby rubyLibs.sass nodejs ]; + buildInputs = [ go ruby rubyPackages.sass nodejs ]; configurePhase = flip concatMapStrings - (with rubyLibs; [ execjs json minitest rake rdoc sass uglifier ]) + (with rubyPackages; [ execjs json minitest rake rdoc sass uglifier ]) (gem: '' export GEM_PATH="$GEM_PATH:${gem}/${ruby.gemPath}" ''); diff --git a/pkgs/tools/audio/mpdcron/default.nix b/pkgs/tools/audio/mpdcron/default.nix index 6a59fc49a954..785565fc38d8 100644 --- a/pkgs/tools/audio/mpdcron/default.nix +++ b/pkgs/tools/audio/mpdcron/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchgit, autoconf, automake, libtool, pkgconfig, glib, libdaemon -, mpd_clientlib, curl, sqlite, ruby, rubyLibs, libnotify, haskellPackages }: +, mpd_clientlib, curl, sqlite, ruby, rubyPackages, libnotify, haskellPackages }: stdenv.mkDerivation rec { version = "20130809"; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ autoconf automake libtool pkgconfig glib libdaemon haskellPackages.pandoc - mpd_clientlib curl sqlite ruby rubyLibs.nokogiri libnotify ]; + mpd_clientlib curl sqlite ruby rubyPackages.nokogiri libnotify ]; preConfigure = '' ./autogen.sh diff --git a/pkgs/tools/package-management/gem-nix/default.nix b/pkgs/tools/package-management/gem-nix/default.nix index e048122b287f..37130b695918 100644 --- a/pkgs/tools/package-management/gem-nix/default.nix +++ b/pkgs/tools/package-management/gem-nix/default.nix @@ -1,9 +1,9 @@ -{ stdenv, rubygems, rubyLibs, ruby, makeWrapper }: +{ stdenv, rubygems, rubyPackages, ruby, makeWrapper }: stdenv.mkDerivation rec { name = "gem-nix"; - buildInputs = [ ruby rubygems rubyLibs.nix makeWrapper ]; + buildInputs = [ ruby rubygems rubyPackages.nix makeWrapper ]; phases = ["installPhase"]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 52ef2292dcbf..d43effa69070 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -654,7 +654,7 @@ let ccnet = callPackage ../tools/networking/ccnet { }; consul = callPackage ../servers/consul { - inherit ruby rubyLibs; + inherit ruby rubyPackages; }; consul_ui = consul.ui; @@ -4050,6 +4050,8 @@ let ruby_2_0 = ruby_2_0_0; ruby_2_1 = ruby_2_1_3; + rubyPackages = callPackage ../development/interpreters/ruby/packages.nix { }; + rubygemsFun = ruby: builderDefsPackage (import ../development/interpreters/ruby/rubygems.nix) { inherit ruby makeWrapper; }; @@ -9968,7 +9970,7 @@ let ruby_gpgme = callPackage ../development/libraries/ruby_gpgme { ruby = ruby_1_9_3; - hoe = rubyLibs.hoe; + hoe = rubyPackages.hoe; }; ruby_ncursesw_sup = callPackage ../development/libraries/ruby_ncursesw_sup { }; @@ -9979,7 +9981,7 @@ let smtube = callPackage ../applications/video/smtube {}; - sup = with rubyLibs; callPackage ../applications/networking/mailreaders/sup { + sup = with rubyPackages; callPackage ../applications/networking/mailreaders/sup { ruby = ruby_1_9_3.override { cursesSupport = true; }; @@ -9992,7 +9994,7 @@ let # See https://github.com/NixOS/nixpkgs/issues/1804 and # https://github.com/NixOS/nixpkgs/issues/2146 - bundler = pkgs.lib.overrideDerivation pkgs.rubyLibs.bundler ( + bundler = pkgs.lib.overrideDerivation pkgs.rubyPackages.bundler ( oldAttrs: { dontPatchShebangs = 1; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 000ff72bd48d..7238ccdf917f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11495,7 +11495,7 @@ let propagatedBuildInputs = with self; [ dateutil ]; preInstall = stdenv.lib.optionalString stdenv.isDarwin '' - sed -i 's|^\([ ]*\)self.bin_path.*$|\1self.bin_path = "${pkgs.rubyLibs.terminal_notifier}/bin/terminal-notifier"|' build/lib/pync/TerminalNotifier.py + sed -i 's|^\([ ]*\)self.bin_path.*$|\1self.bin_path = "${pkgs.rubyPackages.terminal_notifier}/bin/terminal-notifier"|' build/lib/pync/TerminalNotifier.py ''; meta = with stdenv.lib; {