diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/window-managers/wayfire')
7 files changed, 385 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/window-managers/wayfire/default.nix b/nixpkgs/pkgs/applications/window-managers/wayfire/default.nix new file mode 100644 index 000000000000..8311c3690afb --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/wayfire/default.nix @@ -0,0 +1,92 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, meson +, ninja +, pkg-config +, wf-config +, cairo +, doctest +, libdrm +, libexecinfo +, libevdev +, libinput +, libjpeg +, libxkbcommon +, wayland +, wayland-protocols +, wayland-scanner +, wlroots +, pango +, nlohmann_json +, xorg +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "wayfire"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "WayfireWM"; + repo = "wayfire"; + rev = "v${finalAttrs.version}"; + fetchSubmodules = true; + hash = "sha256-YI8N1rY71b2ulv7tAdah7sibG4qq3kY0/hyS0cls5to="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + wayland-scanner + ]; + + buildInputs = [ + wf-config + libdrm + libexecinfo + libevdev + libinput + libjpeg + libxkbcommon + wayland-protocols + xorg.xcbutilwm + wayland + cairo + pango + nlohmann_json + ]; + + propagatedBuildInputs = [ + wlroots + ]; + + nativeCheckInputs = [ + cmake + doctest + ]; + + # CMake is just used for finding doctest. + dontUseCmakeConfigure = true; + + doCheck = true; + + mesonFlags = [ + "--sysconfdir /etc" + "-Duse_system_wlroots=enabled" + "-Duse_system_wfconfig=enabled" + (lib.mesonEnable "wf-touch:tests" (stdenv.buildPlatform.canExecute stdenv.hostPlatform)) + ]; + + passthru.providedSessions = [ "wayfire" ]; + + meta = { + homepage = "https://wayfire.org/"; + description = "3D Wayland compositor"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ qyliss wucke13 rewine ]; + platforms = lib.platforms.unix; + mainProgram = "wayfire"; + }; +}) diff --git a/nixpkgs/pkgs/applications/window-managers/wayfire/plugins.nix b/nixpkgs/pkgs/applications/window-managers/wayfire/plugins.nix new file mode 100644 index 000000000000..111a8c87dd78 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/wayfire/plugins.nix @@ -0,0 +1,11 @@ +{ lib, pkgs }: + +lib.makeScope pkgs.newScope (self: + let + inherit (self) callPackage; + in { + wayfire-plugins-extra = callPackage ./wayfire-plugins-extra.nix { }; + wcm = callPackage ./wcm.nix { }; + wf-shell = callPackage ./wf-shell.nix { }; + } +) diff --git a/nixpkgs/pkgs/applications/window-managers/wayfire/wayfire-plugins-extra.nix b/nixpkgs/pkgs/applications/window-managers/wayfire/wayfire-plugins-extra.nix new file mode 100644 index 000000000000..965266444369 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/wayfire/wayfire-plugins-extra.nix @@ -0,0 +1,69 @@ +{ stdenv +, lib +, fetchFromGitHub +, fetchpatch +, meson +, ninja +, pkg-config +, wayfire +, wf-config +, gtkmm3 +, gtk-layer-shell +, libevdev +, libinput +, libxkbcommon +, xcbutilwm +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "wayfire-plugins-extra"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "WayfireWM"; + repo = "wayfire-plugins-extra"; + rev = "v${finalAttrs.version}"; + fetchSubmodules = true; + hash = "sha256-OVyP1AgZ1d9DXFkbHnROwtSQIquEX5ccVIkcmCdDZtA="; + }; + + patches = [ + (fetchpatch { + name = "check-dependency-libevdev.patch"; + url = "https://github.com/WayfireWM/wayfire-plugins-extra/commit/f3bbf1fcbafd28016e36be7a5043bd82574ac9e4.patch"; + hash = "sha256-8X1lpf8H8NuA845cIslahKDQKW/IA/KiMExU4Snk72o="; + }) + ]; + + postPatch = '' + substituteInPlace metadata/meson.build \ + --replace "wayfire.get_variable(pkgconfig: 'metadatadir')" "join_paths(get_option('prefix'), 'share/wayfire/metadata')" + ''; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = [ + wayfire + wf-config + libevdev + libinput + libxkbcommon + xcbutilwm + gtkmm3 + gtk-layer-shell + ]; + + mesonFlags = [ "--sysconfdir /etc" ]; + + meta = { + homepage = "https://github.com/WayfireWM/wayfire-plugins-extra"; + description = "Additional plugins for Wayfire"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ rewine ]; + inherit (wayfire.meta) platforms; + }; +}) diff --git a/nixpkgs/pkgs/applications/window-managers/wayfire/wcm.nix b/nixpkgs/pkgs/applications/window-managers/wayfire/wcm.nix new file mode 100644 index 000000000000..1acd161e6211 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/wayfire/wcm.nix @@ -0,0 +1,66 @@ +{ stdenv +, lib +, fetchFromGitHub +, meson +, ninja +, pkg-config +, wayland +, wrapGAppsHook +, wayfire +, wf-shell +, wf-config +, wayland-scanner +, wayland-protocols +, gtk3 +, gtkmm3 +, libevdev +, libxml2 +, libxkbcommon +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "wcm"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "WayfireWM"; + repo = "wcm"; + rev = "v${finalAttrs.version}"; + fetchSubmodules = true; + hash = "sha256-UwHJ4Wi83ATnA1CQKNSt8Qga7ooLnAY7QARz2FXvUIo="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + wayland-scanner + wrapGAppsHook + ]; + + buildInputs = [ + wayfire + wf-config + wf-shell + wayland + wayland-protocols + gtk3 + gtkmm3 + libevdev + libxml2 + libxkbcommon + ]; + + mesonFlags = [ + "-Denable_wdisplays=false" + ]; + + meta = { + homepage = "https://github.com/WayfireWM/wcm"; + description = "Wayfire Config Manager"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ qyliss wucke13 rewine ]; + platforms = lib.platforms.unix; + mainProgram = "wcm"; + }; +}) diff --git a/nixpkgs/pkgs/applications/window-managers/wayfire/wf-config.nix b/nixpkgs/pkgs/applications/window-managers/wayfire/wf-config.nix new file mode 100644 index 000000000000..0151ad66f4c4 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/wayfire/wf-config.nix @@ -0,0 +1,60 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, meson +, ninja +, pkg-config +, doctest +, glm +, libevdev +, libxml2 +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "wf-config"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "WayfireWM"; + repo = "wf-config"; + rev = "v${finalAttrs.version}"; + hash = "sha256-4QszCGlJqehnavTOdR2vZ95XuHKiNUIsA893sa9qph8="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = [ + libevdev + libxml2 + ]; + + propagatedBuildInputs = [ + glm + ]; + + nativeCheckInputs = [ + cmake + doctest + ]; + # CMake is just used for finding doctest. + dontUseCmakeConfigure = true; + + mesonFlags = [ + (lib.mesonEnable "tests" (stdenv.buildPlatform.canExecute stdenv.hostPlatform)) + ]; + + doCheck = true; + + meta = { + homepage = "https://github.com/WayfireWM/wf-config"; + description = "Library for managing configuration files, written for Wayfire"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ qyliss wucke13 rewine ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/nixpkgs/pkgs/applications/window-managers/wayfire/wf-shell.nix b/nixpkgs/pkgs/applications/window-managers/wayfire/wf-shell.nix new file mode 100644 index 000000000000..229a87234924 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/wayfire/wf-shell.nix @@ -0,0 +1,55 @@ +{ stdenv +, lib +, fetchFromGitHub +, meson +, ninja +, pkg-config +, wayland-scanner +, wayfire +, wf-config +, alsa-lib +, gtkmm3 +, gtk-layer-shell +, pulseaudio +, libdbusmenu-gtk3 +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "wf-shell"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "WayfireWM"; + repo = "wf-shell"; + rev = "v${finalAttrs.version}"; + fetchSubmodules = true; + hash = "sha256-K5g9DfFlqZyPHDUswx3vtzh0D9ogOQ1p87ZrqyH35vs="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + wayland-scanner + ]; + + buildInputs = [ + wayfire + wf-config + alsa-lib + gtkmm3 + gtk-layer-shell + pulseaudio + libdbusmenu-gtk3 + ]; + + mesonFlags = [ "--sysconfdir /etc" ]; + + meta = { + homepage = "https://github.com/WayfireWM/wf-shell"; + description = "GTK3-based panel for Wayfire"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ qyliss wucke13 rewine ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/nixpkgs/pkgs/applications/window-managers/wayfire/wrapper.nix b/nixpkgs/pkgs/applications/window-managers/wayfire/wrapper.nix new file mode 100644 index 000000000000..35bb3ad15837 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/wayfire/wrapper.nix @@ -0,0 +1,32 @@ +{ symlinkJoin, lib, makeWrapper, wayfire, plugins ? [ ] }: + +symlinkJoin { + name = "wayfire-wrapped-${lib.getVersion wayfire}"; + + nativeBuildInputs = [ makeWrapper ]; + + paths = [ + wayfire + ] ++ plugins; + + postBuild = '' + for binary in $out/bin/*; do + wrapProgram $binary \ + --prefix WAYFIRE_PLUGIN_PATH : $out/lib/wayfire \ + --prefix WAYFIRE_PLUGIN_XML_PATH : $out/share/wayfire/metadata + done + ''; + + preferLocalBuild = true; + + passthru = wayfire.passthru // { + unwrapped = wayfire; + }; + + meta = wayfire.meta // { + # To prevent builds on hydra + hydraPlatforms = []; + # prefer wrapper over the package + priority = (wayfire.meta.priority or 0) - 1; + }; +} |