mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 18:45:59 +01:00
Nix: add hwdata overlay (#1010)
This commit is contained in:
parent
a7ed3a5e47
commit
1a14841a75
3 changed files with 31 additions and 7 deletions
|
@ -24,13 +24,7 @@
|
||||||
pkgsFor = genSystems (system: import nixpkgs {
|
pkgsFor = genSystems (system: import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [(_: prev: {
|
overlays = [(_: prev: {
|
||||||
wayland-protocols = prev.wayland-protocols.overrideAttrs (old: rec {
|
hwdata = prev.callPackage ./nix/hwdata.nix {};
|
||||||
version = "1.27";
|
|
||||||
src = prev.fetchurl {
|
|
||||||
url = "https://gitlab.freedesktop.org/wayland/${old.pname}/-/releases/${version}/downloads/${old.pname}-${version}.tar.xz";
|
|
||||||
hash = "sha256-kEbxCkJdTioAlloDrPtrP7V1pWUDrHLCuGghxpZTN1w=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
})];
|
})];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
28
nix/hwdata.nix
Normal file
28
nix/hwdata.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ lib, stdenv, fetchFromGitHub }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "hwdata";
|
||||||
|
version = "0.363";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "vcrhonek";
|
||||||
|
repo = "hwdata";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-A6GNrHc/t2SVyAyJWmzQTa+pD9wGESsz7DNruW2kH4s=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs ./configure
|
||||||
|
'';
|
||||||
|
|
||||||
|
configureFlags = [ "--datadir=${placeholder "out"}/share" ];
|
||||||
|
|
||||||
|
doCheck = false; # this does build machine-specific checks (e.g. enumerates PCI bus)
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "https://github.com/vcrhonek/hwdata";
|
||||||
|
description = "Hardware Database, including Monitors, pci.ids, usb.ids, and video cards";
|
||||||
|
license = lib.licenses.gpl2Plus;
|
||||||
|
platforms = lib.platforms.all;
|
||||||
|
};
|
||||||
|
}
|
|
@ -6,6 +6,7 @@
|
||||||
xwayland,
|
xwayland,
|
||||||
fetchpatch,
|
fetchpatch,
|
||||||
lib,
|
lib,
|
||||||
|
hwdata,
|
||||||
hidpiXWayland ? true,
|
hidpiXWayland ? true,
|
||||||
enableXWayland ? true,
|
enableXWayland ? true,
|
||||||
nvidiaPatches ? false,
|
nvidiaPatches ? false,
|
||||||
|
@ -51,6 +52,7 @@ assert (lib.assertMsg (hidpiXWayland -> enableXWayland) ''
|
||||||
''
|
''
|
||||||
else ""
|
else ""
|
||||||
);
|
);
|
||||||
|
buildInputs = old.buildInputs ++ [hwdata];
|
||||||
}))
|
}))
|
||||||
.override {
|
.override {
|
||||||
xwayland = xwayland.overrideAttrs (old: {
|
xwayland = xwayland.overrideAttrs (old: {
|
||||||
|
|
Loading…
Reference in a new issue