Skip to content

Commit

Permalink
flutter: Add version json file
Browse files Browse the repository at this point in the history
Needed for flutter doctor and flutter --version

Co-authored-by: Sergii Maksymov <ua.maximoff@gmail.com>
  • Loading branch information
FlafyDev and maximoffua committed Jan 10, 2024
1 parent fe443a8 commit dc1bb8c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion pkgs/development/compilers/flutter/flutter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
, darwin
, git
, which
, jq
}:

let
Expand All @@ -27,7 +28,7 @@ let
inherit src patches version;

buildInputs = [ git ];
nativeBuildInputs = [ makeWrapper ]
nativeBuildInputs = [ makeWrapper jq ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ];

preConfigure = ''
Expand Down Expand Up @@ -67,6 +68,19 @@ let
ln -s '${tools.pubcache}/package_config.json' packages/flutter_tools/.dart_tool/package_config.json
echo -n "${version}" > version
cat <<EOF > bin/cache/flutter.version.json
{
"devToolsVersion": "$(cat "${dart}/bin/resources/devtools/version.json" | jq -r .version)",
"flutterVersion": "${version}",
"frameworkVersion": "${version}",
"channel": "stable",
"repositoryUrl": "https://github.com/flutter/flutter.git",
"frameworkRevision": "nixpkgs000000000000000000000000000000000",
"frameworkCommitDate": "1970-01-01 00:00:00",
"engineRevision": "${engineVersion}",
"dartSdkVersion": "${dart.version}"
}
EOF
'';

installPhase = ''
Expand Down

0 comments on commit dc1bb8c

Please sign in to comment.