diff --git a/pkgs/development/compilers/flutter/flutter.nix b/pkgs/development/compilers/flutter/flutter.nix index de6f29306765..dd76600edb5f 100644 --- a/pkgs/development/compilers/flutter/flutter.nix +++ b/pkgs/development/compilers/flutter/flutter.nix @@ -4,12 +4,25 @@ , src , lib -, git , stdenv +, autoPatchelfHook +, git , which +, atk +, glib +, gtk3 +, libepoxy }: let + # Libraries that Flutter artifacts depend on at runtime. + artifactRuntimeDeps = [ + atk + glib + gtk3 + libepoxy + ]; + self = stdenv.mkDerivation { name = "$flutter-${version}-unwrapped"; @@ -17,7 +30,8 @@ let outputs = [ "out" "cache" ]; - buildInputs = [ git ]; + nativeBuildInputs = [ autoPatchelfHook ]; + buildInputs = [ git ] ++ artifactRuntimeDeps; postPatch = '' patchShebangs --build ./bin/ diff --git a/pkgs/development/compilers/flutter/wrapper.nix b/pkgs/development/compilers/flutter/wrapper.nix index 7b6fd464e35a..7d7747217ad0 100644 --- a/pkgs/development/compilers/flutter/wrapper.nix +++ b/pkgs/development/compilers/flutter/wrapper.nix @@ -95,6 +95,5 @@ in --prefix PATH : '${lib.makeBinPath buildTools}' \ --prefix PKG_CONFIG_PATH : '${builtins.concatStringsSep ":" pkgConfigDirectories}' \ --prefix CXXFLAGS "''\t" '${builtins.concatStringsSep " " cppFlags}' \ - --prefix LDFLAGS "''\t" '${builtins.concatStringsSep " " (map (flag: "-Wl,${flag}") linkerFlags)}' \ - --suffix LD_LIBRARY_PATH : '${lib.makeLibraryPath appPrebuiltDeps}' + --prefix LDFLAGS "''\t" '${builtins.concatStringsSep " " (map (flag: "-Wl,${flag}") linkerFlags)}' '')