depot/third_party/nixpkgs/pkgs/applications/window-managers/hyprwm/hypr/default.nix
Default email a3d4720129 Project import generated by Copybara.
GitOrigin-RevId: e182da8622a354d44c39b3d7a542dc12cd7baa5f
2022-12-28 22:21:41 +01:00

91 lines
1.9 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cairo
, cmake
, glib
, gtkmm3
, harfbuzz
, libX11
, libXdmcp
, libxcb
, makeWrapper
, pcre2
, pkg-config
, xcbutilcursor
, xcbutilkeysyms
, xcbutilwm
, xcbutil
, 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
# TODO: remove on next release
(fetchpatch {
url = "https://github.com/hyprwm/Hypr/commit/08d6af2caf882247943f0e8518ad782f35d1aba4.patch";
sha256 = "sha256-WjR12ZH8CE+l9xSeQUAPYW5r5HzoPpod5YqDPJTdTY8=";
})
(fetchpatch {
url = "https://github.com/hyprwm/Hypr/commit/7512a3ab91865b1e11b8c4a9dfdffb25c2b153de.patch";
sha256 = "sha256-0Hq5n115z0U44op7A1FO9tUOeMEPV0QgD5E5zcmend0=";
})
];
nativeBuildInputs = [
cmake
makeWrapper
pkg-config
];
buildInputs = [
cairo
glib
gtkmm3
harfbuzz
libX11
libXdmcp
libxcb
pcre2
xcbutilcursor
xcbutilkeysyms
xcbutilwm
xcbutil
];
# src/ewmh/ewmh.cpp:67:28: error: non-constant-expression cannot be narrowed from type 'int' to 'uint32_t' (aka 'unsigned int') in initializer list
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-c++11-narrowing";
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;
mainProgram = "Hypr";
};
})