diff options
Diffstat (limited to 'pkgs/applications/window-managers/hyprwm/hypr')
-rw-r--r-- | pkgs/applications/window-managers/hyprwm/hypr/000-dont-set-compiler.diff | 18 | ||||
-rw-r--r-- | pkgs/applications/window-managers/hyprwm/hypr/default.nix | 77 |
2 files changed, 95 insertions, 0 deletions
diff --git a/pkgs/applications/window-managers/hyprwm/hypr/000-dont-set-compiler.diff b/pkgs/applications/window-managers/hyprwm/hypr/000-dont-set-compiler.diff new file mode 100644 index 0000000000000..b12763b82f696 --- /dev/null +++ b/pkgs/applications/window-managers/hyprwm/hypr/000-dont-set-compiler.diff @@ -0,0 +1,18 @@ +diff -Naur source-old/CMakeLists.txt source/CMakeLists.txt +--- source-old/CMakeLists.txt 2022-10-19 00:55:52.766480588 -0300 ++++ source/CMakeLists.txt 2022-10-19 00:56:08.368515654 -0300 +@@ -1,7 +1,5 @@ + cmake_minimum_required(VERSION 3.4) + +-set(CMAKE_CXX_COMPILER "/bin/g++") +- + project(Hypr + VERSION 0.1 + DESCRIPTION "A Modern OOP C++ Window Manager" +@@ -54,4 +52,4 @@ + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg -no-pie -fno-builtin") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg -no-pie -fno-builtin") + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg -no-pie -fno-builtin") +-ENDIF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) +\ No newline at end of file ++ENDIF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) diff --git a/pkgs/applications/window-managers/hyprwm/hypr/default.nix b/pkgs/applications/window-managers/hyprwm/hypr/default.nix new file mode 100644 index 0000000000000..673fa90c5005b --- /dev/null +++ b/pkgs/applications/window-managers/hyprwm/hypr/default.nix @@ -0,0 +1,77 @@ +{ lib +, stdenv +, fetchFromGitHub +, cairo +, cmake +, glib +, gtkmm3 +, harfbuzz +, libX11 +, libXdmcp +, libxcb +, makeWrapper +, pcre2 +, pkg-config +, xcbutilcursor +, xcbutilkeysyms +, xcbutilwm +, xmodmap +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "hypr"; + version = "unstable-2022-05-25"; + + src = fetchFromGitHub { + owner = "hyprwm"; + repo = "Hypr"; + rev = "3e3d943c446ae77c289611a1a875c8dff8883c1e"; + hash = "sha256-lyaGGm53qxg7WVoFxZ7kerLe12P1N3JbN8nut6oZS50="; + }; + + patches = [ + ./000-dont-set-compiler.diff + ]; + + nativeBuildInputs = [ + cmake + makeWrapper + pkg-config + ]; + + buildInputs = [ + cairo + glib + gtkmm3 + harfbuzz + libX11 + libXdmcp + libxcb + pcre2 + xcbutilcursor + xcbutilkeysyms + xcbutilwm + ]; + + installPhase = '' + runHook preInstall + + install -Dm755 Hypr -t $out/bin + + runHook postInstall + ''; + + postFixup = '' + wrapProgram $out/bin/Hypr --prefix PATH : ${lib.makeBinPath [ xmodmap ]} + ''; + + meta = with lib; { + inherit (finalAttrs.src.meta) homepage; + description = "A tiling X11 window manager written in modern C++"; + license = licenses.bsd3; + maintainers = with maintainers; [ AndersonTorres ]; + inherit (libX11.meta) platforms; + broken = stdenv.isDarwin; # xcb/xcb_atom.h not found + mainProgram = "Hypr"; + }; +}) |