From c442c7172da26802c311e67d4e27399f7cb6dfee Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Tue, 6 Sep 2016 11:25:18 +0800 Subject: [PATCH] ledger-web: do not make our own wrapper --- pkgs/applications/office/ledger-web/default.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/office/ledger-web/default.nix b/pkgs/applications/office/ledger-web/default.nix index b7ba10a730f7..95f91351a549 100644 --- a/pkgs/applications/office/ledger-web/default.nix +++ b/pkgs/applications/office/ledger-web/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, makeWrapper, bundlerEnv, ruby +{ stdenv, lib, fetchFromGitHub, bundlerEnv, ruby , withPostgresql ? true, postgresql , withSqlite ? false, sqlite }: @@ -8,7 +8,7 @@ let cmd = "ledger_web"; env = bundlerEnv { - name = _name; + name = "${_name}-env"; inherit ruby; gemfile = ./Gemfile; lockfile = ./Gemfile.lock; @@ -25,7 +25,7 @@ in stdenv.mkDerivation rec { name = "${_name}-${version}"; version = "1.5.2"; - buildInputs = [ env ruby makeWrapper ] + buildInputs = [ env ruby ] ++ lib.optional withPostgresql postgresql ++ lib.optional withSqlite sqlite; @@ -39,14 +39,10 @@ in stdenv.mkDerivation rec { dontStrip = true; installPhase = '' - mkdir -p $out + mkdir -p $out/bin - cp --no-preserve=mode -r bin lib $out + cp --no-preserve=mode -r lib $out - chmod 0755 $out/bin/${cmd} - - wrapProgram $out/bin/${cmd} \ - --set BUNDLE_BIN ${env.bundler}/bin/bundle \ - --set GEM_PATH ${env}/${env.ruby.gemPath} + ln -s ${env}/bin/${cmd} $out/bin/${cmd} ''; }