From bb307bd1840b224ece568dfa126adf6f54bcb927 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 31 Jan 2022 11:59:14 +0100 Subject: Generate JSON build description --- nix/build_index.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nix/build_index.nix b/nix/build_index.nix index 5107324e..8f5885b3 100644 --- a/nix/build_index.nix +++ b/nix/build_index.nix @@ -88,9 +88,11 @@ let builds = builtins.sort cmpDate (map (x: { version = x; builds = builtins.getAttr x builds_per_version; }) versions_commit); } ]; - in - pkgs.writeText "index.html" '' +{ + json = pkgs.writeTextDir "share/_releases.json" (builtins.toJSON sorted_builds); + + html = pkgs.writeTextDir "share/_releases.html" '' @@ -143,4 +145,5 @@ in ''))} -'' +''; +} -- cgit v1.2.3