From ee01d24a457c506c2d9663c002a63c1c81079277 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 11 Jan 2020 19:49:39 +0100 Subject: [PATCH] notmuch: use `writeShellScript` --- modules/programs/notmuch.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/programs/notmuch.nix b/modules/programs/notmuch.nix index f1fb1d819..74aa9320d 100644 --- a/modules/programs/notmuch.nix +++ b/modules/programs/notmuch.nix @@ -186,18 +186,14 @@ in let hook = name: cmds: { - "${notmuchIni.database.path}/.notmuch/hooks/${name}" = { - source = pkgs.writeScript name '' - #!${pkgs.runtimeShell} - + "${notmuchIni.database.path}/.notmuch/hooks/${name}".source = + pkgs.writeShellScript name '' export PATH="${pkgs.notmuch}/bin''${PATH:+:}$PATH" export NOTMUCH_CONFIG="${config.xdg.configHome}/notmuch/notmuchrc" export NMBGIT="${config.xdg.dataHome}/notmuch/nmbug" ${cmds} ''; - executable = true; - }; }; in optionalAttrs (cfg.hooks.preNew != "")