summary refs log tree commit diff
path: root/pkgs/tools/networking/mu
diff options
context:
space:
mode:
authorCharlotte Van Petegem <charlotte@vanpetegem.me>2021-03-20 15:20:24 +0100
committerCharlotte Van Petegem <charlotte@vanpetegem.me>2021-03-20 15:20:24 +0100
commit16789169749eae298751393e22a55f5d5e67b4e2 (patch)
tree2cab75ade86f1e671353a4126833407726b91224 /pkgs/tools/networking/mu
parenta04bdd8fbe386dc3b2d3635db18aa83d2e4279c1 (diff)
downloadnixpkgs-16789169749eae298751393e22a55f5d5e67b4e2.tar
nixpkgs-16789169749eae298751393e22a55f5d5e67b4e2.tar.gz
nixpkgs-16789169749eae298751393e22a55f5d5e67b4e2.tar.bz2
nixpkgs-16789169749eae298751393e22a55f5d5e67b4e2.tar.lz
nixpkgs-16789169749eae298751393e22a55f5d5e67b4e2.tar.xz
nixpkgs-16789169749eae298751393e22a55f5d5e67b4e2.tar.zst
nixpkgs-16789169749eae298751393e22a55f5d5e67b4e2.zip
mu: Fix included scripts not finding their dependencies
Diffstat (limited to 'pkgs/tools/networking/mu')
-rw-r--r--pkgs/tools/networking/mu/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/tools/networking/mu/default.nix b/pkgs/tools/networking/mu/default.nix
index 8f46e657edb..4553063929f 100644
--- a/pkgs/tools/networking/mu/default.nix
+++ b/pkgs/tools/networking/mu/default.nix
@@ -1,6 +1,7 @@
 { lib, stdenv, fetchFromGitHub, sqlite, pkg-config, autoreconfHook, pmccabe
-, xapian, glib, gmime3, texinfo , emacs, guile
+, xapian, glib, gmime3, texinfo, emacs, guile
 , gtk3, webkitgtk, libsoup, icu
+, makeWrapper
 , withMug ? false
 , batchSize ? null }:
 
@@ -27,7 +28,7 @@ stdenv.mkDerivation rec {
     ++ lib.optional (!stdenv.isDarwin) guile
     ++ lib.optionals withMug [ gtk3 webkitgtk ];
 
-  nativeBuildInputs = [ pkg-config autoreconfHook pmccabe ];
+  nativeBuildInputs = [ pkg-config autoreconfHook pmccabe makeWrapper ];
 
   enableParallelBuilding = true;
 
@@ -37,8 +38,12 @@ stdenv.mkDerivation rec {
       --replace "@abs_top_builddir@" "$out"
   '';
 
-  # Install mug
-  postInstall = lib.optionalString withMug ''
+  # Make sure included scripts can find their dependencies & optionally install mug
+  postInstall = ''
+    wrapProgram "$out/bin/mu" \
+      --prefix LD_LIBRARY_PATH : "$out/lib" \
+      --prefix GUILE_LOAD_PATH : "$out/share/guile/site/2.2"
+  '' + lib.optionalString withMug ''
     for f in mug ; do
       install -m755 toys/$f/$f $out/bin/$f
     done