urlwatch: filter _module with kv

before this commit { url= ...; filter=... } didn't work because
the result contained _module
This commit is contained in:
makefu 2017-07-02 23:08:09 +02:00
parent b4bcf2b0a4
commit 5c26d65ae4
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -60,6 +60,7 @@ let
description = "URL to watch.";
example = [
https://nixos.org/channels/nixos-unstable/git-revision
{ url = http://localhost ; filter = "grep:important.*stuff"; }
];
apply = map (x: getAttr (typeOf x) {
set = x;
@ -79,7 +80,8 @@ let
};
urlsFile = pkgs.writeText "urls"
(concatMapStringsSep "\n---\n" toJSON cfg.urls);
(concatMapStringsSep "\n---\n"
(x: toJSON (filterAttrs (n: v: n != "_module") x)) cfg.urls);
hooksFile = cfg.hooksFile;