-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] languages.flutter (not android but desktop) #1425
Comments
Feels like a good idea (since I took a week to realize flutter is natively supported). |
I'm currently using the following flake for a {
description = "flutter shell";
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, flake-utils, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system: {
devShell =
let
pkgs = import nixpkgs {
inherit system;
};
inherit (pkgs) lib;
myllvm = pkgs.llvmPackages_15;
# clang = pkgs.llvmPackages_15.clangUseLLVM;
libs = with pkgs; [
atk at-spi2-core.dev
dbus.dev
gtk3
pango cairo harfbuzz gdk-pixbuf glib # these are transitive but explicit here for the LD_LIBRARY_PATH
fontconfig
libdatrie
libselinux libsepol pcre
libthai
libxkbcommon
pcre2
util-linux.dev
xorg.libX11.dev xorg.libXdmcp xorg.libXtst
libappindicator.dev
libepoxy
libdeflate
gnome.zenity
];
in
(pkgs.mkShell.override { stdenv = myllvm.stdenv; }) {
nativeBuildInputs = with pkgs; [
pkg-config
ninja
cmake
dart
flutter
go_1_20
] ++ [
myllvm.bintools # https://matklad.github.io/2022/03/14/rpath-or-why-lld-doesnt-work-on-nixos.html
];
buildInputs = libs ++ (with myllvm; [
libcxxClang
libunwind
]);
shellHook = ''
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${lib.makeLibraryPath [ pkgs.libepoxy ]}
# unset NIX_LDFLAGS
# unset NIX_CFLAGS_COMPILE
# unset NIX_CFLAGS_LINK
# export LD_LIBRARY_PATH=${lib.makeLibraryPath [ pkgs.libepoxy ]}
# export GLIBC_LIB_PATH=${lib.makeLibraryPath [ pkgs.glibc ]}
'';
};
});
} In any case we've been doing everything without worrying about android here, and just at some point built (I think) an android build on one of the other platform's VMs (may have been windows?), because we had some obscure problem on But I guess it would be best for |
Would be cool to have. Some ideas:
android.flutter
disappears and instead havelanguage.flutter
with a list of targets (desktop/android/etc). Rationale: main reason for using flutter is to target multiple platforms with one code base.clang
stdenv
override per default, since a lot of (at least) flutter desktop uses it anyway.I might try my hand at this some time (now using custom
devShell
flakes, though I'm not the one actually devving in flutter), but it won't be very soon probably. So if anyone is "itching", be my guest 😉If not, let's regard this as a placeholder/reminder.
The text was updated successfully, but these errors were encountered: