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