Skip to content
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

fix(flake): swayfx builds again #383

Merged
merged 3 commits into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 9 additions & 23 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
scenefx.url = "github:wlrfx/scenefx";
scenefx.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{
Expand All @@ -14,13 +15,23 @@
let
mkPackage = pkgs: {
swayfx-unwrapped =
pkgs.swayfx-unwrapped.overrideAttrs
(pkgs.swayfx-unwrapped.override {
wlroots_0_17 = pkgs.wlroots_0_18;
}).overrideAttrs
(old: {
version = "0.4.0-git";
src = pkgs.lib.cleanSource ./.;
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.cmake ];
buildInputs = old.buildInputs ++ [ pkgs.scenefx ];
providedSessions = [ pkgs.swayfx-unwrapped.meta.mainProgram ];
patches = []; ## this should probably be fixed properly
mesonFlags = let
inherit (pkgs.lib.strings) mesonEnable mesonOption;
in
[
(mesonOption "sd-bus-provider" "libsystemd")
(mesonEnable "tray" true)
];
});
};

Expand Down Expand Up @@ -55,7 +66,7 @@
name = "swayfx-shell";
inputsFrom = [
self.packages.${pkgs.system}.swayfx-unwrapped
pkgs.wlroots_0_17
pkgs.wlroots_0_18
pkgs.scenefx
];
packages = with pkgs; [
Expand All @@ -65,7 +76,7 @@
(
# Copy the nix version of wlroots and scenefx into the project
mkdir -p "$PWD/subprojects" && cd "$PWD/subprojects"
cp -R --no-preserve=mode,ownership ${pkgs.wlroots_0_17.src} wlroots
cp -R --no-preserve=mode,ownership ${pkgs.wlroots_0_18.src} wlroots
cp -R --no-preserve=mode,ownership ${pkgs.scenefx.src} scenefx
)'';
};
Expand Down