mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 04:49:47 +01:00
nix: override libdrm to use newer version (#4003)
This commit is contained in:
parent
12ec549a18
commit
29970228c5
2 changed files with 26 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
fetchurl,
|
||||
stdenv,
|
||||
pkg-config,
|
||||
makeWrapper,
|
||||
|
@ -38,6 +39,16 @@
|
|||
nvidiaPatches ? false,
|
||||
hidpiXWayland ? false,
|
||||
}:
|
||||
let
|
||||
# NOTE: remove after https://github.com/NixOS/nixpkgs/pull/271096 reaches nixos-unstable
|
||||
libdrm_2_4_118 = libdrm.overrideAttrs(attrs: rec {
|
||||
version = "2.4.118";
|
||||
src = fetchurl {
|
||||
url = "https://dri.freedesktop.org/${attrs.pname}/${attrs.pname}-${version}.tar.xz";
|
||||
hash = "sha256-p3e9hfK1/JxX+IbIIFgwBXgxfK/bx30Kdp1+mpVnq4g=";
|
||||
};
|
||||
});
|
||||
in
|
||||
assert lib.assertMsg (!nvidiaPatches) "The option `nvidiaPatches` has been removed.";
|
||||
assert lib.assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` has been removed.";
|
||||
assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland";
|
||||
|
@ -74,7 +85,7 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov
|
|||
cairo
|
||||
hyprland-protocols
|
||||
libGL
|
||||
libdrm
|
||||
libdrm_2_4_118
|
||||
libinput
|
||||
libxkbcommon
|
||||
mesa
|
||||
|
|
|
@ -1,18 +1,31 @@
|
|||
{
|
||||
fetchurl,
|
||||
version,
|
||||
src,
|
||||
wlroots,
|
||||
hwdata,
|
||||
libdisplay-info,
|
||||
libliftoff,
|
||||
libdrm,
|
||||
enableXWayland ? true,
|
||||
}:
|
||||
let
|
||||
# NOTE: remove after https://github.com/NixOS/nixpkgs/pull/271096 reaches nixos-unstable
|
||||
libdrm_2_4_118 = libdrm.overrideAttrs(old: rec {
|
||||
version = "2.4.118";
|
||||
src = fetchurl {
|
||||
url = "https://dri.freedesktop.org/${old.pname}/${old.pname}-${version}.tar.xz";
|
||||
hash = "sha256-p3e9hfK1/JxX+IbIIFgwBXgxfK/bx30Kdp1+mpVnq4g=";
|
||||
};
|
||||
});
|
||||
in
|
||||
wlroots.overrideAttrs (old: {
|
||||
inherit version src enableXWayland;
|
||||
|
||||
pname = "${old.pname}-hyprland";
|
||||
|
||||
buildInputs = old.buildInputs ++ [hwdata libliftoff libdisplay-info];
|
||||
# HACK: libdrm_2_4_118 is placed at the head of list to take precedence over libdrm in `old.buildInputs`
|
||||
buildInputs = [libdrm_2_4_118] ++ old.buildInputs ++ [hwdata libliftoff libdisplay-info];
|
||||
|
||||
NIX_CFLAGS_COMPILE = toString [
|
||||
"-Wno-error=maybe-uninitialized"
|
||||
|
|
Loading…
Reference in a new issue