Permalink
Browse files

Add test for Sinatra gem.

Just a simple hello world example.
  • Loading branch information...
1 parent ce904b9 commit 0e7200d600316dc1be22ea5c3acdf16d5baa5e8f @jimpick committed Mar 3, 2009
@@ -0,0 +1,32 @@
+{stdenv, fetchurl, rubygems, rubygem_rack, rubygem_sinatra, makeWrapper}:
+
+stdenv.mkDerivation {
+ name = "jim-sinatra-test-0.1";
+
+ buildInputs = [makeWrapper];
+
+ inherit rubygems rubygem_sinatra;
+
+ src = ./jim-sinatra-test.rb;
+
+ phases = "installPhase fixupPhase";
+
+ installCommand = ''
+ mkdir -p $out/bin
+ cp $src $out/bin/jim-sinatra-test.rb
+ chmod u+w $out/bin/jim-sinatra-test.rb
+ '';
+
+ postInstall = ''
+ wrapProgram $out/bin/jim-sinatra-test.rb --prefix RUBYLIB : $rubygems/lib \
+ --prefix GEM_PATH : $rubygem_sinatra:$rubygem_rack
+ '';
+
+ meta = {
+ description = "Test Sinatra";
+ longDescription = ''
+ Test Sinatra
+ '';
+ };
+
+}
@@ -0,0 +1,9 @@
+#! /usr/bin/env ruby
+
+require 'rubygems'
+require 'sinatra'
+
+get '/' do
+ 'Hello world!'
+end
+
@@ -2167,6 +2167,10 @@ let
inherit fetchurl stdenv rubygems rubygem_json makeWrapper;
};
+ jim_sinatra_test = import ../jim-custom/jim-sinatra-test {
+ inherit fetchurl stdenv rubygems rubygem_rack rubygem_sinatra makeWrapper;
+ };
+
rq = import ../applications/networking/cluster/rq {
inherit fetchurl stdenv sqlite ruby ;
};

0 comments on commit 0e7200d

Please sign in to comment.