summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoerg Thalheim <joerg@thalheim.io>2017-09-25 15:49:14 +0100
committerJoerg Thalheim <joerg@thalheim.io>2017-09-25 15:49:14 +0100
commit407d8dac85e9a1901091955e078345ee9d5313c6 (patch)
tree74e764e574b6d705a9b121e5ab52b43129aa0583
parent932bd985105a535d4f142449620a7df0f5a1de1b (diff)
downloadnixpkgs-407d8dac85e9a1901091955e078345ee9d5313c6.tar
nixpkgs-407d8dac85e9a1901091955e078345ee9d5313c6.tar.gz
nixpkgs-407d8dac85e9a1901091955e078345ee9d5313c6.tar.bz2
nixpkgs-407d8dac85e9a1901091955e078345ee9d5313c6.tar.lz
nixpkgs-407d8dac85e9a1901091955e078345ee9d5313c6.tar.xz
nixpkgs-407d8dac85e9a1901091955e078345ee9d5313c6.tar.zst
nixpkgs-407d8dac85e9a1901091955e078345ee9d5313c6.zip
watson-ruby: hide bundlerEnv to avoid collisions
bundlerEnv also comes with a bundle script and ruby libraries
-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;