mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 09:05:59 +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,
|
lib,
|
||||||
|
fetchurl,
|
||||||
stdenv,
|
stdenv,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
|
@ -38,6 +39,16 @@
|
||||||
nvidiaPatches ? false,
|
nvidiaPatches ? false,
|
||||||
hidpiXWayland ? 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 (!nvidiaPatches) "The option `nvidiaPatches` has been removed.";
|
||||||
assert lib.assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` 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";
|
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
|
cairo
|
||||||
hyprland-protocols
|
hyprland-protocols
|
||||||
libGL
|
libGL
|
||||||
libdrm
|
libdrm_2_4_118
|
||||||
libinput
|
libinput
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
mesa
|
mesa
|
||||||
|
|
|
@ -1,18 +1,31 @@
|
||||||
{
|
{
|
||||||
|
fetchurl,
|
||||||
version,
|
version,
|
||||||
src,
|
src,
|
||||||
wlroots,
|
wlroots,
|
||||||
hwdata,
|
hwdata,
|
||||||
libdisplay-info,
|
libdisplay-info,
|
||||||
libliftoff,
|
libliftoff,
|
||||||
|
libdrm,
|
||||||
enableXWayland ? true,
|
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: {
|
wlroots.overrideAttrs (old: {
|
||||||
inherit version src enableXWayland;
|
inherit version src enableXWayland;
|
||||||
|
|
||||||
pname = "${old.pname}-hyprland";
|
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 [
|
NIX_CFLAGS_COMPILE = toString [
|
||||||
"-Wno-error=maybe-uninitialized"
|
"-Wno-error=maybe-uninitialized"
|
||||||
|
|
Loading…
Reference in a new issue