summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-11-23 15:54:13 +0100
committertv <tv@krebsco.de>2020-11-23 15:54:13 +0100
commitf9e11a96488d5404cab04244b044d7be371eb45e (patch)
tree577e9457b93d6097a5e7ca207a9d9dee092d5dc4 /tv/2configs
parent5b455f5cca910198dfbb7b0fbd1b01acede64446 (diff)
tv elm-package-proxy: list newest packages first
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/elm-packages-proxy.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/tv/2configs/elm-packages-proxy.nix b/tv/2configs/elm-packages-proxy.nix
index bc471a322..cc1e119cb 100644
--- a/tv/2configs/elm-packages-proxy.nix
+++ b/tv/2configs/elm-packages-proxy.nix
@@ -165,7 +165,6 @@ in {
;;
'POST /all-packages/since/'*)
- # TODO only show newest?
my_packages=$(
cd ${cfg.packageDir}
find -mindepth 3 -maxdepth 3 |
@@ -174,7 +173,9 @@ in {
map(
select(.!="") |
sub("^\\./(?<author>[^/]+)/(?<pname>[^/]+)/(?<version>[^/]+)$";"\(.author)/\(.pname)@\(.version)")
- )
+ ) |
+ sort_by(split("@") | [.[0]]+(.[1]|split("."))) |
+ reverse
'
)