flake: update-feeds now actually does update *all* feeds
This commit is contained in:
@@ -142,8 +142,7 @@
|
||||
program =
|
||||
let
|
||||
pkgs = self.legacyPackages."x86_64-linux";
|
||||
args = pkgs.feeds."xkcd.com".passthru.updateScript;
|
||||
script = pkgs.writeShellScript "update-feeds" (builtins.concatStringsSep " " args);
|
||||
script = pkgs.feeds.passthru.updateScript;
|
||||
in "${script}";
|
||||
};
|
||||
};
|
||||
|
@@ -7,11 +7,20 @@
|
||||
# TODO: dependency-inject this.
|
||||
sane-data = import ../../modules/data { inherit lib; };
|
||||
template = self.callPackage ./template.nix;
|
||||
in lib.mapAttrs
|
||||
(name: feed-details: template {
|
||||
feedName = name;
|
||||
jsonPath = "modules/data/feeds/sources/${name}/default.json";
|
||||
inherit (feed-details) url;
|
||||
})
|
||||
sane-data.feeds
|
||||
feed-pkgs = lib.mapAttrs
|
||||
(name: feed-details: template {
|
||||
feedName = name;
|
||||
jsonPath = "modules/data/feeds/sources/${name}/default.json";
|
||||
inherit (feed-details) url;
|
||||
})
|
||||
sane-data.feeds;
|
||||
update-scripts = lib.mapAttrsToList
|
||||
(name: feed: builtins.concatStringsSep " " feed.passthru.updateScript)
|
||||
feed-pkgs;
|
||||
in
|
||||
feed-pkgs // {
|
||||
passthru.updateScript = pkgs.writeShellScript
|
||||
"feeds-update"
|
||||
(builtins.concatStringsSep "\n" update-scripts);
|
||||
}
|
||||
))
|
||||
|
Reference in New Issue
Block a user