about summary refs log tree commit diff
path: root/pkgs/applications/misc/keepass/default.nix
diff options
context:
space:
mode:
authorAlexey Lebedeff <alebedev@mirantis.com>2016-05-05 12:25:24 +0300
committerAlexey Lebedeff <alebedev@mirantis.com>2016-05-05 12:25:24 +0300
commitd625c7ee3f657af3b3ab87b2a7d53a1cace5d74a (patch)
treec43c2ef3d894aec7450c15ed9192e92a6f3c5506 /pkgs/applications/misc/keepass/default.nix
parentdf310048e5f4a516663bf8c5a74029b54813a7f3 (diff)
downloadnixlib-d625c7ee3f657af3b3ab87b2a7d53a1cace5d74a.tar
nixlib-d625c7ee3f657af3b3ab87b2a7d53a1cace5d74a.tar.gz
nixlib-d625c7ee3f657af3b3ab87b2a7d53a1cace5d74a.tar.bz2
nixlib-d625c7ee3f657af3b3ab87b2a7d53a1cace5d74a.tar.lz
nixlib-d625c7ee3f657af3b3ab87b2a7d53a1cace5d74a.tar.xz
nixlib-d625c7ee3f657af3b3ab87b2a7d53a1cace5d74a.tar.zst
nixlib-d625c7ee3f657af3b3ab87b2a7d53a1cace5d74a.zip
keepass: fix warning about missing GTK
Some part of Mono is trying to dynamically load GTK - starting `keepass`
always shows warning:

```
Gtk not found (missing LD_LIBRARY_PATH to libgtk-x11-2.0.so.0?), using built-in colorscheme
```
Diffstat (limited to 'pkgs/applications/misc/keepass/default.nix')
-rw-r--r--pkgs/applications/misc/keepass/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/applications/misc/keepass/default.nix b/pkgs/applications/misc/keepass/default.nix
index d6835388d89e..29d434c53af0 100644
--- a/pkgs/applications/misc/keepass/default.nix
+++ b/pkgs/applications/misc/keepass/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, buildDotnetPackage, makeWrapper, unzip, makeDesktopItem, icoutils, plugins ? [] }:
+{ stdenv, lib, fetchurl, buildDotnetPackage, makeWrapper, unzip, makeDesktopItem, icoutils, gtk2, plugins ? [] }:
 
 # KeePass looks for plugins in under directory in which KeePass.exe is
 # located. It follows symlinks where looking for that directory, so
@@ -72,6 +72,8 @@ with builtins; buildDotnetPackage rec {
   # is found and does not pollute output path.
   binPaths = lib.concatStrings (lib.intersperse ":" (map (x: x + "/bin") plugins));
 
+  dynlibPath = stdenv.lib.makeLibraryPath [ gtk2 ];
+
   postInstall = 
   let
     extractFDeskIcons = ./extractWinRscIconsToStdFreeDesktopDir.sh;
@@ -79,7 +81,9 @@ with builtins; buildDotnetPackage rec {
   ''
     mkdir -p "$out/share/applications"
     cp ${desktopItem}/share/applications/* $out/share/applications
-    wrapProgram $out/bin/keepass --prefix PATH : "$binPaths"
+    wrapProgram $out/bin/keepass \
+      --prefix PATH : "$binPaths" \
+      --prefix LD_LIBRARY_PATH : "$dynlibPath"
 
     ${extractFDeskIcons} \
       "./Translation/TrlUtil/Resources/KeePass.ico" \