summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/tools/misc/watson-ruby/default.nix25
1 files changed, 18 insertions, 7 deletions
diff --git a/pkgs/development/tools/misc/watson-ruby/default.nix b/pkgs/development/tools/misc/watson-ruby/default.nix
index 86035835454..32f94a1f228 100644
--- a/pkgs/development/tools/misc/watson-ruby/default.nix
+++ b/pkgs/development/tools/misc/watson-ruby/default.nix
@@ -1,14 +1,25 @@
-{ lib, bundlerEnv, ruby }:
+{ stdenv, bundlerEnv, ruby }:
 
-bundlerEnv rec {
-  name = "watson-ruby-${version}";
 
+stdenv.mkDerivation rec {
+  name = "watson-ruby-${version}";
   version = (import ./gemset.nix).watson-ruby.version;
-  inherit ruby;
-  # expects Gemfile, Gemfile.lock and gemset.nix in the same directory
-  gemdir = ./.;
 
-  meta = with lib; {
+  env = bundlerEnv rec {
+    name = "watson-ruby-gems-${version}";
+    inherit ruby;
+    # expects Gemfile, Gemfile.lock and gemset.nix in the same directory
+    gemdir = ./.;
+  };
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    ln -s ${env}/bin/watson $out/bin/watson
+  '';
+
+  meta = with stdenv.lib; {
     description = "An inline issue manager";
     homepage    = http://goosecode.com/watson/;
     license     = with licenses; mit;