1{ stdenv, bundlerEnv, ruby, bundlerUpdateScript }:
2
3
4stdenv.mkDerivation rec {
5 pname = "watson-ruby";
6 version = (import ./gemset.nix).watson-ruby.version;
7
8 env = bundlerEnv {
9 name = "watson-ruby-gems-${version}";
10 inherit ruby;
11 # expects Gemfile, Gemfile.lock and gemset.nix in the same directory
12 gemdir = ./.;
13 };
14
15 phases = [ "installPhase" ];
16
17 installPhase = ''
18 mkdir -p $out/bin
19 ln -s ${env}/bin/watson $out/bin/watson
20 '';
21
22 passthru.updateScript = bundlerUpdateScript "watson-ruby";
23
24 meta = with stdenv.lib; {
25 description = "An inline issue manager";
26 homepage = http://goosecode.com/watson/;
27 license = with licenses; mit;
28 maintainers = with maintainers; [ robertodr nicknovitski ];
29 platforms = platforms.unix;
30 };
31}