···8899the format is based on [keep a changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0.html).
10101111+## unreleased
1212+1313+### changed
1414+1515+- added default meta attributes to `buildGleamApplication` derivations
1616+ - `platforms`, `badPlatforms` based on runtime + gleam compiler
1717+ - `mainProgram` based on generated script name
1818+1119## v1.1.0 - 2025-09-29
12201321### added
+38-1
nix/build-gleam-application.nix
···3737 buildGleamArgs ? { },
3838 gleamNixOverrides ? _: _: { },
3939 ...
4040- }:
4040+ }@attrs:
41414242 let
4343 derivationList = attrs: lib.filter (v: lib.isDerivation v) (lib.attrValues attrs);
···134134135135 runHook postInstall
136136 '';
137137+138138+ meta =
139139+ let
140140+ runtimePlatforms =
141141+ if finalAttrs.target == "erlang" then
142142+ (finalAttrs.erlang.meta.platforms or lib.platforms.all)
143143+ else
144144+ (
145145+ if finalAttrs.jsRuntime != null then
146146+ (finalAttrs.jsRuntime.meta.platforms or lib.platforms.all)
147147+ else
148148+ lib.platforms.all
149149+ );
150150+ runtimeBadPlatforms =
151151+ if finalAttrs.target == "erlang" then
152152+ (finalAttrs.erlang.meta.badPlatforms or [ ])
153153+ else
154154+ (if finalAttrs.jsRuntime != null then (finalAttrs.jsRuntime.meta.badPlatforms or [ ]) else [ ]);
155155+ in
156156+ (
157157+ if finalAttrs.target == "erlang" || finalAttrs.jsRuntime != null then
158158+ { mainProgram = finalAttrs.pname; }
159159+ else
160160+ { }
161161+ )
162162+ // (attrs.meta or { })
163163+ // {
164164+ platforms = lib.intersectLists runtimePlatforms (
165165+ lib.intersectLists (finalAttrs.gleam.meta.platforms or lib.platforms.all) (
166166+ attrs.meta.platforms or lib.platforms.all
167167+ )
168168+ );
169169+ badPlatforms =
170170+ runtimeBadPlatforms
171171+ ++ (finalAttrs.gleam.meta.badPlatforms or [ ])
172172+ ++ (attrs.meta.badPlatforms or [ ]);
173173+ };
137174 };
138175}