summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2016-10-14 11:51:23 +0100
committerGitHub <noreply@github.com>2016-10-14 11:51:23 +0100
commit6351c4d24b4cf0c75d51aeb8cd3c3720488a111d (patch)
treefba58c545750428d7b691cecdc4597216550974f /pkgs/tools
parent7619bea1fe9378d395975598016fe82f75e6ef4b (diff)
parentaa018638582d77f0be503ad2a68ad42ead9d886a (diff)
downloadnixlib-6351c4d24b4cf0c75d51aeb8cd3c3720488a111d.tar
nixlib-6351c4d24b4cf0c75d51aeb8cd3c3720488a111d.tar.gz
nixlib-6351c4d24b4cf0c75d51aeb8cd3c3720488a111d.tar.bz2
nixlib-6351c4d24b4cf0c75d51aeb8cd3c3720488a111d.tar.lz
nixlib-6351c4d24b4cf0c75d51aeb8cd3c3720488a111d.tar.xz
nixlib-6351c4d24b4cf0c75d51aeb8cd3c3720488a111d.tar.zst
nixlib-6351c4d24b4cf0c75d51aeb8cd3c3720488a111d.zip
Merge pull request #19180 from zimbatm/bundler-env-bins
Bundler env bins
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/fluentd/default.nix8
-rw-r--r--pkgs/tools/misc/lolcat/default.nix8
-rw-r--r--pkgs/tools/package-management/fpm/default.nix8
-rw-r--r--pkgs/tools/system/foreman/default.nix25
-rw-r--r--pkgs/tools/system/hiera-eyaml/default.nix23
-rw-r--r--pkgs/tools/typesetting/asciidoctor/default.nix14
6 files changed, 20 insertions, 66 deletions
diff --git a/pkgs/tools/misc/fluentd/default.nix b/pkgs/tools/misc/fluentd/default.nix
index 4c5de7448409..25e083b6bf57 100644
--- a/pkgs/tools/misc/fluentd/default.nix
+++ b/pkgs/tools/misc/fluentd/default.nix
@@ -1,12 +1,10 @@
 { stdenv, lib, bundlerEnv, ruby, curl }:
 
 bundlerEnv {
-  name = "fluentd-0.14.0";
-
   inherit ruby;
-  gemfile = ./Gemfile;
-  lockfile = ./Gemfile.lock;
-  gemset = ./gemset.nix;
+
+  pname = "fluentd";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "A data collector";
diff --git a/pkgs/tools/misc/lolcat/default.nix b/pkgs/tools/misc/lolcat/default.nix
index 21355652d3e3..21377d7bfa4a 100644
--- a/pkgs/tools/misc/lolcat/default.nix
+++ b/pkgs/tools/misc/lolcat/default.nix
@@ -2,12 +2,10 @@
 , pkgconfig, which }:
 
 bundlerEnv {
-  name = "lolcat-42.1.0";
-
   inherit ruby;
-  gemfile = ./Gemfile;
-  lockfile = ./Gemfile.lock;
-  gemset = ./gemset.nix;
+
+  pname = "lolcat";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "A rainbow version of cat";
diff --git a/pkgs/tools/package-management/fpm/default.nix b/pkgs/tools/package-management/fpm/default.nix
index ca2e44fcaf00..4a18bfb5345f 100644
--- a/pkgs/tools/package-management/fpm/default.nix
+++ b/pkgs/tools/package-management/fpm/default.nix
@@ -1,13 +1,9 @@
 { lib, bundlerEnv, ruby }:
 
 bundlerEnv rec {
-  name = "fpm-${version}";
-
-  version = (import gemset).fpm.version;
   inherit ruby;
-  gemfile = ./Gemfile;
-  lockfile = ./Gemfile.lock;
-  gemset = ./gemset.nix;
+  pname = "fpm";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "Tool to build packages for multiple platforms with ease";
diff --git a/pkgs/tools/system/foreman/default.nix b/pkgs/tools/system/foreman/default.nix
index 594947c265a3..1c74724793d4 100644
--- a/pkgs/tools/system/foreman/default.nix
+++ b/pkgs/tools/system/foreman/default.nix
@@ -1,24 +1,9 @@
-{ stdenv, lib, ruby, bundlerEnv, makeWrapper }:
+{ bundlerEnv, lib, ruby }:
 
-stdenv.mkDerivation rec {
-  name = "foreman-${env.gems.foreman.version}";
-
-  env = bundlerEnv {
-    inherit ruby;
-    name = "${name}-gems";
-    gemfile = ./Gemfile;
-    lockfile = ./Gemfile.lock;
-    gemset = ./gemset.nix;
-  };
-
-  phases = ["installPhase"];
-
-  nativeBuildInputs = [ makeWrapper ];
-
-  installPhase = ''
-    mkdir -p $out/bin
-    makeWrapper ${env}/bin/foreman $out/bin/foreman
-  '';
+bundlerEnv {
+  inherit ruby;
+  pName = "foreman";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "Process manager for applications with multiple components";
diff --git a/pkgs/tools/system/hiera-eyaml/default.nix b/pkgs/tools/system/hiera-eyaml/default.nix
index 615a66f86551..029a975dc913 100644
--- a/pkgs/tools/system/hiera-eyaml/default.nix
+++ b/pkgs/tools/system/hiera-eyaml/default.nix
@@ -1,22 +1,9 @@
-{ lib, bundlerEnv, stdenv }:
+{ lib, bundlerEnv, ruby }:
 
-let
-  name = "hiera-eyaml-${env.gems.hiera-eyaml.version}";
-
-  env = bundlerEnv {
-    inherit name;
-    gemfile = ./Gemfile;
-    lockfile = ./Gemfile.lock;
-    gemset = ./gemset.nix;
-  };
-
-in stdenv.mkDerivation {
-  inherit name;
-
-  buildCommand = ''
-    mkdir -p $out/bin
-    ln -s ${env}/bin/eyaml $out/bin/eyaml
-  '';
+bundlerEnv {
+  inherit ruby;
+  pName = "hiera-eyaml";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "Per-value asymmetric encryption of sensitive data for Hiera";
diff --git a/pkgs/tools/typesetting/asciidoctor/default.nix b/pkgs/tools/typesetting/asciidoctor/default.nix
index dd90444d6af6..495a5fcf8821 100644
--- a/pkgs/tools/typesetting/asciidoctor/default.nix
+++ b/pkgs/tools/typesetting/asciidoctor/default.nix
@@ -1,19 +1,9 @@
 { stdenv, lib, bundlerEnv, ruby_2_2, curl }:
 
 bundlerEnv rec {
-  name = "asciidoctor-${version}";
-  version = "1.5.4";
-
+  pname = "asciidoctor";
   ruby = ruby_2_2;
-  gemfile = ./Gemfile;
-  lockfile = ./Gemfile.lock;
-  gemset = ./gemset.nix;
-
-  # Delete dependencies' executables
-  postBuild = ''
-    find $out/bin -type f -not -wholename '*bin/asciidoctor*' -print0 \
-    | xargs -0 rm
-  '';
+  gemdir = ./.;
 
   meta = with lib; {
     description = "A faster Asciidoc processor written in Ruby";