Skip to content

Commit

Permalink
fix: flake building (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnae authored Feb 23, 2025
1 parent 50d4cf4 commit ba743d2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
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.

21 changes: 17 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
description = "Swayfx development environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
scenefx.url = "github:wlrfx/scenefx";
scenefx = {
url = "github:wlrfx/scenefx";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
Expand All @@ -14,13 +17,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 +68,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 +78,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

0 comments on commit ba743d2

Please sign in to comment.