Skip to content

Commit 72f766c

Browse files
committed
nixos: Add fontconfig.lib to shell.nix, in LD_LIBRARY_PATH
Otherwise `flutter run -d linux` fails with an error like (wrapped): ``` $ nix-shell --run 'flutter run -d linux' Launching lib/main.dart on Linux in debug mode... /nix/store/pnajkjw1fz03z1x27ski1qbx9n3hd4df-binutils-2.39/bin/ld: warning: libfontconfig.so.1, needed by /home/greg/z/flutter/linux/flutter/ephemeral/libflutter_linux_gtk.so, not found (try using -rpath or -rpath-link) clang-11: error: linker command failed with exit code 1 (use -v to see invocation) Building Linux application... Exception: Build process failed ``` Sadly just including it in `nativeBuildInputs` doesn't fix the issue, so we resort to LD_LIBRARY_PATH.
1 parent f7feabf commit 72f766c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shell.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,8 @@ mkShell {
3838
android-studio
3939
android-tools
4040
];
41+
42+
LD_LIBRARY_PATH = lib.makeLibraryPath [
43+
fontconfig.lib
44+
];
4145
}

0 commit comments

Comments
 (0)