forked from Henry-Hiles/nexus
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:
parent
db2a169f34
commit
b28f2f4979
1 changed files with 25 additions and 0 deletions
25
flake.nix
25
flake.nix
|
|
@ -29,6 +29,17 @@
|
|||
...
|
||||
}:
|
||||
|
||||
let
|
||||
src = ./.;
|
||||
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 {
|
||||
inherit system;
|
||||
|
|
@ -59,6 +70,20 @@
|
|||
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=";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue