Flutter builder not finding cmake

I am trying to package Yubico Authenticator, since the legacy version is broken and has been removed from nixpkgs, and the build fails early on because it is unable to find CMake, even if I specify cmake in nativeBuildInputs.

nix-build log

Derivation source: nixpkgs/default.nix at be5d40e5c61c071e26f2b55f24dab124a1127da8 · aidalgol/nixpkgs · GitHub

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/mdvlnmazg6vxb3i7wkazw9v6m929yqjm-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "installPhase" }
Setting "enable-linux-desktop" value to "true".

You may need to restart any open editors for them to read new settings.
Downloading Material fonts...                                    1,690ms
Downloading Gradle Wrapper...                                      229ms
Downloading package sky_engine...                                  691ms
Downloading flutter_patched_sdk tools...                         1,131ms
Downloading flutter_patched_sdk_product tools...                   785ms
Downloading linux-x64 tools...                                   2,912ms
Downloading linux-x64/font-subset tools...                         315ms
Running "flutter pub get" in source...                             13.6s
Downloading linux-x64/linux-x64-flutter-gtk tools...                4.2s
Downloading linux-x64-profile/linux-x64-flutter-gtk tools...      1,083ms
Downloading linux-x64-release/linux-x64-flutter-gtk tools...      2,041ms

💪 Building with sound null safety 💪

Building Linux application...
CMake is required for Linux development.
It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
mv: cannot stat '.packages': No such file or directory

It looks like Flutter build support in nixpkgs is undocumented, so I am not sure how I should be using mkFlutterApp. Is anyone able to shed some light on this?

1 Like