I was previously directed to take a look at how FluffyChat is built in nixpkgs, but that doesn’t seem to work:
There is flutter.mkFlutterApp
, but I tried it with an empty project created with flutter create
and I got an error not only on nix build
, but also on nix develop
.
I wrote this Nixpkgs package as default.nix
:
{ lib, flutter }:
flutter.mkFlutterApp {
version = "0.0.0";
pname = "test-flutter-app";
src = ./.;
meta = { };
}
…and this as flake.nix
:
{
outputs = { nixpkgs, self, flake-utils }:
flake-utils.lib.eachDefaultSystem (system: {
packages.default = nixpkgs.legacyPackages.${system}.callPackage ./. { };
});
}
But I still get this error:
Oops; flutter has exited unexpectedly: "ProcessException: Failed to find "cmake" in the search path.
How can this be? FluffyChat uses CMake too, but doesn’t specify it as a build input.