about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/flutter/flutter.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/flutter/flutter.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/flutter.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/compilers/flutter/flutter.nix b/nixpkgs/pkgs/development/compilers/flutter/flutter.nix
index fad2a646a165..7fda2d616f3e 100644
--- a/nixpkgs/pkgs/development/compilers/flutter/flutter.nix
+++ b/nixpkgs/pkgs/development/compilers/flutter/flutter.nix
@@ -1,5 +1,5 @@
-{ channel, pname, version, sha256Hash, patches
-, filename ? "flutter_linux_v${version}-${channel}.tar.xz" }:
+{ channel, pname, version, sha256Hash, patches, dart
+, filename ? "flutter_linux_${version}-${channel}.tar.xz"}:
 
 { bash, buildFHSUserEnv, cacert, coreutils, git, makeWrapper, runCommand, stdenv
 , fetchurl, alsaLib, dbus, expat, libpulseaudio, libuuid, libX11, libxcb
@@ -72,6 +72,7 @@ let
       with pkgs; [
         bash
         curl
+        dart
         git
         unzip
         which
@@ -110,8 +111,7 @@ in runCommand drvName {
   allowSubstitutes = false;
   passthru = { unwrapped = flutter; };
   meta = with stdenv.lib; {
-    description =
-      "Flutter is Google's SDK for building mobile, web and desktop with Dart.";
+    description = "Flutter is Google's SDK for building mobile, web and desktop with Dart";
     longDescription = ''
       Flutter is Google’s UI toolkit for building beautiful,
       natively compiled applications for mobile, web, and desktop from a single codebase.
@@ -119,11 +119,15 @@ in runCommand drvName {
     homepage = "https://flutter.dev";
     license = licenses.bsd3;
     platforms = [ "x86_64-linux" ];
-    maintainers = with maintainers; [ babariviere ];
+    maintainers = with maintainers; [ babariviere ericdallo ];
   };
 } ''
   mkdir -p $out/bin
 
   echo -n "$startScript" > $out/bin/${pname}
   chmod +x $out/bin/${pname}
+
+  mkdir -p $out/bin/cache/dart-sdk/
+  cp -r ${dart}/* $out/bin/cache/dart-sdk/
+  ln $out/bin/cache/dart-sdk/bin/dart $out/bin/dart
 ''