From 098e8500d4b00066813f0c9dbbd49eadb87b8030 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Wed, 15 Jun 2016 20:47:54 -0400 Subject: [PATCH] riemann-dash: Wrap to keep bundler and sass out of user env --- .../monitoring/riemann-dash/default.nix | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/pkgs/servers/monitoring/riemann-dash/default.nix b/pkgs/servers/monitoring/riemann-dash/default.nix index 1afcd81d9be..32f543fbf2f 100644 --- a/pkgs/servers/monitoring/riemann-dash/default.nix +++ b/pkgs/servers/monitoring/riemann-dash/default.nix @@ -1,8 +1,26 @@ -{ bundlerEnv }: +{ bundlerEnv, lib, stdenv }: -bundlerEnv { - name = "riemann-dash-0.2.9"; - gemfile = ./Gemfile; - lockfile = ./Gemfile.lock; - gemset = ./gemset.nix; +let + name = "riemann-dash-${env.gems.riemann-dash.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/riemann-dash $out/bin/riemann-dash + ''; + + meta = with lib; { + description = "A javascript, websockets-powered dashboard for Riemann"; + homepage = https://github.com/riemann/riemann-dash; + license = licenses.mit; + platforms = platforms.unix; + }; }