add packages.default flake output

this likely doesn't work (yet),
cannot properly test because at time of writing,
the app doesn't compile through `flutter run` either.
This commit is contained in:
Elec3137 2026-02-01 11:46:56 -08:00
commit 32393f12c0

View file

@ -29,6 +29,20 @@
... ...
}: }:
let
src = ./.;
# from https://discourse.nixos.org/t/is-there-a-way-to-read-a-yaml-file-and-get-back-a-set/18385/5
fromYAML =
file:
builtins.fromJSON (
builtins.readFile (
pkgs.runCommand "converted-yaml.json" { } ''${pkgs.yj}/bin/yj < "${file}" > "$out"''
)
);
package = fromYAML "${src}/pubspec.yaml";
in
{ {
_module.args.pkgs = import nixpkgs { _module.args.pkgs = import nixpkgs {
inherit system; inherit system;
@ -59,6 +73,20 @@
CPATH = lib.makeSearchPath "include" [ pkgs.glibc.dev ]; CPATH = lib.makeSearchPath "include" [ pkgs.glibc.dev ];
}; };
}; };
packages.default = pkgs.flutter.buildFlutterApplication {
inherit src;
pname = package.name;
version = package.version;
pubspecLock = fromYAML "${src}/pubspec.lock";
gitHashes = {
flutter_chat_ui = "sha256-4fuag7lRH5cMBFD3fUzj2K541JwXLoz8HF/4OMr3uhk=";
flutter_link_previewer = "sha256-4fuag7lRH5cMBFD3fUzj2K541JwXLoz8HF/4OMr3uhk=";
flyer_chat_text_message = "sha256-4fuag7lRH5cMBFD3fUzj2K541JwXLoz8HF/4OMr3uhk=";
window_size = "sha256-XelNtp7tpZ91QCEcvewVphNUtgQX7xrp5QP0oFo6DgM=";
};
};
}; };
}; };
} }