3
0
Fork 0
forked from mirrors/nixpkgs

ruby: WIP

This commit is contained in:
Charles Strahan 2014-12-30 21:05:00 -05:00
parent 74a4f01fe4
commit 94dd4b9721
15 changed files with 76 additions and 34 deletions

View file

@ -8,7 +8,6 @@ let
cfg = config.services.redmine;
ruby = pkgs.ruby;
rubyPackages = pkgs.rubyPackages;
databaseYml = ''
production:

View file

@ -0,0 +1,4 @@
---
gem:
https://rubygems.org/downloads/mini_portile-0.6.0.gem: 09kcn4g63xrdirgwxgjikqg976rr723bkc9bxfr29pk22cj3wavn
https://rubygems.org/downloads/gpgme-2.0.7.gem: 1p84zhiri2ihcld7py9mwc2kg5xs5da8fk11zhndrhmw05yvf5mr

View file

@ -0,0 +1,2 @@
---
BUNDLE_NO_INSTALL: true

View file

@ -0,0 +1,6 @@
source "https://rubygems.org"
#gem "sup", "0.20.0"
#gem 'sup', '~> 0.20.0'
#gem 'gpgme'
gem 'gpgme', '2.0.7'

View file

@ -0,0 +1,12 @@
GEM
remote: https://rubygems.org/
specs:
gpgme (2.0.7)
mini_portile (>= 0.5.0, <= 0.6.0)
mini_portile (0.6.0)
PLATFORMS
ruby
DEPENDENCIES
gpgme (= 2.0.7)

View file

@ -0,0 +1,19 @@
{
gpgme = {
version = "2.0.7";
src = {
type = "gem";
sha256 = "1p84zhiri2ihcld7py9mwc2kg5xs5da8fk11zhndrhmw05yvf5mr";
};
dependencies = [
"mini_portile"
];
};
mini_portile = {
version = "0.6.0";
src = {
type = "gem";
sha256 = "09kcn4g63xrdirgwxgjikqg976rr723bkc9bxfr29pk22cj3wavn";
};
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ruby, rubyPackages, libiconv, libiconvOrNull, libiconvOrLibc, libxslt, libxml2, pkgconfig, libffi, glibc, imagemagickBig, postgresql }:
{ stdenv, fetchurl, ruby, rubyPackages, bundler, libiconv, libiconvOrNull, libiconvOrLibc, libxslt, libxml2, pkgconfig, libffi, glibc, 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 rubyPackages.bundler
ruby bundler
] ++ (if (libiconvOrNull != null) then [libiconv] else []) ++ [
libxslt libxml2 pkgconfig libffi
imagemagickBig postgresql

View file

@ -0,0 +1,18 @@
{ buildRubyGem, coreutils, fetchgit }:
buildRubyGem {
name = "bundler-HEAD";
src = fetchgit {
url = "https://github.com/bundler/bundler.git";
rev = "17919e790cd8f6fb369d6afc81f0afec6fb5ad8b";
sha256 = "10gqashaax0i18gs95pijqsnpnwfj9v3va5rpxps0v597d16px9b";
leaveDotGit = true;
};
dontPatchShebangs = true;
postInstall = ''
find $out -type f -perm +0100 | while read f; do
substituteInPlace $f \
--replace "/usr/bin/env" "${coreutils}/bin/env"
done
'';
}

View file

@ -1,7 +1,13 @@
{ buildRubyGem }:
{ buildRubyGem, coreutils }:
buildRubyGem {
name = "bundler-1.7.4";
sha256 = "122k07z60780mr00zfbbw04v9xlw1fhxjsx4g2rbm66hxlnlnh89";
name = "bundler-1.7.9";
sha256 = "1gd201rh17xykab9pbqp0dkxfm7b9jri02llyvmrc0c5bz2vhycm";
dontPatchShebangs = true;
postInstall = ''
find $out -type f -perm +0100 | while read f; do
substituteInPlace $f \
--replace "/usr/bin/env" "${coreutils}/bin/env"
done
'';
}

View file

@ -42,7 +42,6 @@ composableDerivation.composableDerivation {} rec {
name = "ruby";
enable = {
buildInputs = [ ruby ];
# export same env vars as in rubyPackages
preConfigure = ''
export RUBY_LIB=$out/${ruby.libPath}
export RUBY_LIB_ARCH=$RUBY_LIB

View file

@ -42,7 +42,6 @@ composableDerivation.composableDerivation {} rec {
name = "ruby";
enable = {
buildInputs = [ ruby ];
# export same env vars as in rubyPackages
preConfigure = ''
export RUBY_LIB=$out/${ruby.libPath}
export RUBY_LIB_ARCH=$RUBY_LIB

View file

@ -1,5 +1,5 @@
{ stdenv, lib, go, fetchgit, fetchhg, fetchbzr, fetchFromGitHub
, ruby, rubyPackages, nodejs, loadRubyEnv }:
, ruby, nodejs, loadRubyEnv }:
let
version = "0.4.1";

View file

@ -1,4 +1,4 @@
{ stdenv, fetchgit, autoconf, automake, libtool, pkgconfig, glib, libdaemon
{ stdenv, fetchgit, autoconf, automake, libtool, pkgconfig, glib, libdaemon, buildRubyGem
, mpd_clientlib, curl, sqlite, ruby, rubyPackages, libnotify, haskellPackages }:
stdenv.mkDerivation rec {
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
buildInputs =
[ autoconf automake libtool pkgconfig glib libdaemon haskellPackages.pandoc
mpd_clientlib curl sqlite ruby rubyPackages.nokogiri libnotify ];
mpd_clientlib curl sqlite ruby /*nokogiri*/ libnotify ];
preConfigure = ''
./autogen.sh

View file

@ -1,23 +0,0 @@
{ stdenv, rubygems, rubyPackages, ruby, makeWrapper }:
stdenv.mkDerivation rec {
name = "gem-nix";
buildInputs = [ ruby rubygems rubyPackages.nix makeWrapper ];
phases = ["installPhase"];
installPhase = ''
mkdir -p $out/bin
echo 'exec ${rubygems}/bin/gem nix "$@"' >> $out/bin/gem-nix
chmod +x $out/bin/gem-nix
wrapProgram $out/bin/gem-nix \
--set GEM_PATH $GEM_PATH
'';
meta = with stdenv.lib; {
description = "gem nix command in a nice wrapper";
platforms = platforms.unix;
maintainers = [ maintainers.iElectric ];
};
}

View file

@ -4189,6 +4189,7 @@ let
};
bundler = callPackage ../development/interpreters/ruby/bundler.nix { };
bundler_HEAD = callPackage ../development/interpreters/ruby/bundler-head.nix { };
gemFixes = callPackage ../development/interpreters/ruby/fixes.nix { };
buildRubyGem = callPackage ../development/interpreters/ruby/gem.nix { };
loadRubyEnv = callPackage ../development/interpreters/ruby/load-ruby-env.nix { };