aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMihai Fufezan <[email protected]>2022-11-13 21:32:15 +0200
committerGitHub <[email protected]>2022-11-13 19:32:15 +0000
commit1a14841a75b2c387b9f67b7f7c40e0b5d3e1f86b (patch)
tree5068c84b5f6d646a18773f637dbdc8b1943c171f
parenta7ed3a5e4718c5c3a84306bb190a3272e2bdecda (diff)
downloadHyprland-1a14841a75b2c387b9f67b7f7c40e0b5d3e1f86b.tar.gz
Hyprland-1a14841a75b2c387b9f67b7f7c40e0b5d3e1f86b.zip
Nix: add hwdata overlay (#1010)
-rw-r--r--flake.nix8
-rw-r--r--nix/hwdata.nix28
-rw-r--r--nix/wlroots.nix2
3 files changed, 31 insertions, 7 deletions
diff --git a/flake.nix b/flake.nix
index 14f47a8c..111a7743 100644
--- a/flake.nix
+++ b/flake.nix
@@ -24,13 +24,7 @@
pkgsFor = genSystems (system: import nixpkgs {
inherit system;
overlays = [(_: prev: {
- wayland-protocols = prev.wayland-protocols.overrideAttrs (old: rec {
- 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=";
- };
- });
+ hwdata = prev.callPackage ./nix/hwdata.nix {};
})];
});
diff --git a/nix/hwdata.nix b/nix/hwdata.nix
new file mode 100644
index 00000000..c121ef6f
--- /dev/null
+++ b/nix/hwdata.nix
@@ -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;
+ };
+}
diff --git a/nix/wlroots.nix b/nix/wlroots.nix
index 65b281aa..ee54557b 100644
--- a/nix/wlroots.nix
+++ b/nix/wlroots.nix
@@ -6,6 +6,7 @@
xwayland,
fetchpatch,
lib,
+ hwdata,
hidpiXWayland ? true,
enableXWayland ? true,
nvidiaPatches ? false,
@@ -51,6 +52,7 @@ assert (lib.assertMsg (hidpiXWayland -> enableXWayland) ''
''
else ""
);
+ buildInputs = old.buildInputs ++ [hwdata];
}))
.override {
xwayland = xwayland.overrideAttrs (old: {