summary refs log tree commit diff
path: root/pkgs/development/tools/misc/watson-ruby/default.nix
blob: 23ec0643d77d7d33b544857f442cdadc4558d450 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ lib, stdenv, bundlerEnv, ruby, bundlerUpdateScript }:

stdenv.mkDerivation rec {
  pname = "watson-ruby";
  version = (import ./gemset.nix).watson-ruby.version;

  phases = [ "installPhase" ];

  installPhase = let
    env = bundlerEnv {
      name = "watson-ruby-gems-${version}";
      inherit ruby;
      # expects Gemfile, Gemfile.lock and gemset.nix in the same directory
      gemdir = ./.;
    };
  in ''
    mkdir -p $out/bin
    ln -s ${env}/bin/watson $out/bin/watson
  '';

  passthru.updateScript = bundlerUpdateScript "watson-ruby";

  meta = with lib; {
    description = "An inline issue manager";
    homepage    = "https://goosecode.com/watson/";
    license     = with licenses; mit;
    maintainers = with maintainers; [ robertodr nicknovitski ];
    platforms   = platforms.unix;
  };
}