Skip to content

Commit b520ee7

Browse files
authored
Merge pull request #47 from uchar-org/bugfix/pkg-config
Bugfix/pkg config
2 parents a58bd0e + 8044f08 commit b520ee7

2 files changed

Lines changed: 33 additions & 4 deletions

File tree

nix/package.nix

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,14 @@ let
5353

5454
platforms = {
5555
web = import ./platforms/web.nix { inherit pkgs pinnedFlutter; };
56-
linux = import ./platforms/linux.nix { inherit pkgs stdenv lib; };
56+
linux = import ./platforms/linux.nix {
57+
inherit
58+
pkgs
59+
pinnedFlutter
60+
stdenv
61+
lib
62+
;
63+
};
5764
apk = import ./platforms/apk.nix {
5865
inherit
5966
pkgs
@@ -65,9 +72,16 @@ let
6572
};
6673

6774
in
68-
pinnedFlutter.buildFlutterApplication (
75+
(pinnedFlutter.buildFlutterApplication (
6976
head
7077
// lib.optionalAttrs (targetFlutterPlatform == "linux") platforms.linux
7178
// lib.optionalAttrs (targetFlutterPlatform == "web") platforms.web
7279
// lib.optionalAttrs (targetFlutterPlatform == "apk") platforms.apk
73-
)
80+
)).overrideAttrs
81+
(old: {
82+
# extraIncludes = break [ pkgs.fribidi.dev ];
83+
# flutterBuildFlags = [
84+
# "--cmake-args"
85+
# "-CXXFLAGS=\"-I${pkgs.fribidi.dev}/include\""
86+
# ];
87+
})

nix/platforms/linux.nix

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
pkgs,
3+
pinnedFlutter,
34
stdenv,
45
lib,
56
...
@@ -9,17 +10,31 @@ let
910
pkgs.libgbm
1011
pkgs.libdrm
1112
];
13+
vodozemac-wasm = pkgs.callPackage ../vodozemac { flutter = pinnedFlutter; };
1214
in
1315
{
1416
nativeBuildInputs = with pkgs; [
1517
imagemagick
1618
copyDesktopItems
1719
webkitgtk_4_1
20+
rustup
1821
];
1922

20-
runtimeDependencies = with pkgs; [ pulseaudio ];
23+
buildInputs = [ vodozemac-wasm ];
24+
25+
runtimeDependencies = with pkgs; [
26+
pulseaudio
27+
vodozemac-wasm
28+
];
2129

2230
env.NIX_LDFLAGS = "-rpath-link ${libwebrtcRpath}";
31+
NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker";
32+
33+
env.CPATH = "${pkgs.fribidi.dev}/include/fribidi";
34+
35+
shellHook = ''
36+
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./build/linux/x64/debug/bundle/lib/"
37+
'';
2338

2439
desktopItems = [
2540
(pkgs.makeDesktopItem {

0 commit comments

Comments
 (0)