rescuetime: use makeLibraryPath for LD_PRELOAD hack

This commit is contained in:
Tobias Geerinckx-Rice 2016-05-03 03:01:45 +02:00
parent 21b667e066
commit 5d25d7d987
No known key found for this signature in database
GPG Key ID: 91CCDB9B48541B99

View File

@ -24,7 +24,11 @@ stdenv.mkDerivation {
dpkg-deb -x $src pkg
sourceRoot=pkg
'';
installPhase = ''
installPhase = let
lib = p: stdenv.lib.makeLibraryPath [ p ];
in ''
mkdir -p $out/bin
cp usr/bin/rescuetime $out/bin
@ -33,7 +37,7 @@ stdenv.mkDerivation {
$out/bin/rescuetime
wrapProgram $out/bin/rescuetime \
--prefix LD_PRELOAD : ${qt4}/lib/libQtGui.so.4:${qt4}/lib/libQtCore.so.4:${libXtst}/lib/libXtst.so.6:${libXext}/lib/libXext.so.6:${libX11}/lib/libX11.so.6:${libXScrnSaver}/lib/libXss.so.1
--prefix LD_PRELOAD : ${lib qt4}/libQtGui.so.4:${lib qt4}/libQtCore.so.4:${lib libXtst}/libXtst.so.6:${lib libXext}/libXext.so.6:${lib libX11}/libX11.so.6:${lib libXScrnSaver}/libXss.so.1
'';
meta = with lib; {
description = "Helps you understand your daily habits so you can focus and be more productive";