vdirsyncer: create postHook script when non-empty
This commit is contained in:
parent
f80df90c10
commit
1683c507c2
|
@ -137,8 +137,8 @@ in {
|
|||
};
|
||||
|
||||
postHook = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
description = ''
|
||||
Command to call for each item creation and modification.
|
||||
The command will be called with the path of the new/updated
|
||||
|
|
|
@ -26,8 +26,9 @@ let
|
|||
filterAttrs (_: v: v != null)
|
||||
((getAttrs [ "type" "fileExt" "encoding" ] a.local) // {
|
||||
path = a.local.path;
|
||||
postHook = pkgs.writeShellScriptBin "post-hook" a.vdirsyncer.postHook
|
||||
+ "/bin/post-hook";
|
||||
postHook = optionalString (a.vdirsyncer.postHook != null)
|
||||
(pkgs.writeShellScriptBin "post-hook" a.vdirsyncer.postHook
|
||||
+ "/bin/post-hook");
|
||||
});
|
||||
|
||||
remoteStorage = a:
|
||||
|
|
Loading…
Reference in a new issue