|
18 | 18 | mkPackage = pkgs: { |
19 | 19 | swayfx-unwrapped = |
20 | 20 | (pkgs.swayfx-unwrapped.override { |
| 21 | + # This override block is currently empty, you might remove it |
| 22 | + # unless you intend to override function arguments later. |
21 | 23 | }).overrideAttrs |
22 | 24 | (old: { |
23 | 25 | version = "0.4.0-git"; |
24 | 26 | src = pkgs.lib.cleanSource ./.; |
25 | 27 | nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.cmake ]; |
26 | | - buildInputs = old.buildInputs ++ [ pkgs.scenefx ]; |
| 28 | + # Add wlroots_0_18 here |
| 29 | + buildInputs = old.buildInputs ++ [ |
| 30 | + pkgs.scenefx |
| 31 | + pkgs.wlroots_0_18 # <-- Added this line |
| 32 | + ]; |
27 | 33 | providedSessions = [ pkgs.swayfx-unwrapped.meta.mainProgram ]; |
28 | | - patches = []; ## this should probably be fixed properly |
| 34 | + patches = []; ## Consider if you need patches from the original derivation |
29 | 35 | mesonFlags = let |
30 | 36 | inherit (pkgs.lib.strings) mesonEnable mesonOption; |
31 | 37 | in |
32 | 38 | [ |
33 | 39 | (mesonOption "sd-bus-provider" "libsystemd") |
34 | 40 | (mesonEnable "tray" true) |
| 41 | + # You might need to explicitly enable fx if the default changed |
| 42 | + # (mesonEnable "fx" true) # <-- Potentially add this if needed |
35 | 43 | ]; |
36 | 44 | }); |
37 | 45 | }; |
|
65 | 73 | devShells = forEachSystem (pkgs: { |
66 | 74 | default = pkgs.mkShell { |
67 | 75 | name = "swayfx-shell"; |
| 76 | + # inputsFrom propagates buildInputs, nativeBuildInputs etc. from the listed derivations |
| 77 | + # Adding wlroots and scenefx explicitly here is fine, but they are also included via inputsFrom |
68 | 78 | inputsFrom = [ |
69 | 79 | self.packages.${pkgs.system}.swayfx-unwrapped |
| 80 | + # pkgs.wlroots_0_18 # Included via swayfx-unwrapped buildInputs now |
| 81 | + # pkgs.scenefx # Included via swayfx-unwrapped buildInputs now |
| 82 | + ]; |
| 83 | + # You still might want wlroots/scenefx here if you need tools/headers directly in the shell |
| 84 | + # outside of what swayfx uses. |
| 85 | + buildInputs = [ |
70 | 86 | pkgs.wlroots_0_18 |
71 | 87 | pkgs.scenefx |
72 | 88 | ]; |
|
76 | 92 | shellHook = '' |
77 | 93 | ( |
78 | 94 | # Copy the nix version of wlroots and scenefx into the project |
| 95 | + # This is useful if you want meson to use them as subprojects during manual dev/testing |
| 96 | + echo "Copying wlroots and scenefx sources to ./subprojects for dev environment..." |
79 | 97 | mkdir -p "$PWD/subprojects" && cd "$PWD/subprojects" |
| 98 | + rm -rf wlroots scenefx # Clean previous copies if they exist |
80 | 99 | cp -R --no-preserve=mode,ownership ${pkgs.wlroots_0_18.src} wlroots |
81 | 100 | cp -R --no-preserve=mode,ownership ${pkgs.scenefx.src} scenefx |
82 | | - )''; |
| 101 | + echo "Done copying sources." |
| 102 | + cd "$OLDPWD" |
| 103 | + ) || echo "Failed to copy subproject sources." |
| 104 | + ''; |
83 | 105 | }; |
84 | 106 | }); |
85 | 107 |
|
|
0 commit comments