From 33d71aa99b1f7c7f4a4a187aa9f676a376fc898d Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sat, 9 Mar 2024 01:58:53 +0200 Subject: [PATCH] Nix: add hyprcursor --- flake.lock | 72 ++++++++++++++++++++++++++++++++--- flake.nix | 6 +++ nix/default.nix | 3 +- nix/overlays.nix | 1 + nix/patches/meson-build.patch | 5 ++- src/meson.build | 1 + 6 files changed, 80 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index d94efaaa..4fea97d3 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,29 @@ { "nodes": { + "hyprcursor": { + "inputs": { + "hyprlang": "hyprlang", + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1709942067, + "narHash": "sha256-DGU4zQDwIx6pXM6oHdA+89UU/QjqE05HiXOvigECJjI=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "a2233d4a2a58233457712acfd88d10a2a8a85711", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, "hyprland-protocols": { "inputs": { "nixpkgs": [ @@ -24,6 +48,28 @@ } }, "hyprlang": { + "inputs": { + "nixpkgs": [ + "hyprcursor", + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlang_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -33,11 +79,11 @@ ] }, "locked": { - "lastModified": 1709775675, - "narHash": "sha256-G+gIMUQBtfbbrnsM/OPJzebdqKFP6typplNCE7X8Szw=", + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "f1db1a7e1faee2a5c67d03b6bd283da82eed3730", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", "type": "github" }, "original": { @@ -64,10 +110,11 @@ }, "root": { "inputs": { + "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", + "hyprlang": "hyprlang_2", "nixpkgs": "nixpkgs", - "systems": "systems", + "systems": "systems_2", "wlroots": "wlroots", "xdph": "xdph" } @@ -87,6 +134,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "wlroots": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index be80440a..1a613b01 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,12 @@ flake = false; }; + hyprcursor = { + url = "github:hyprwm/hyprcursor"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.systems.follows = "systems"; + }; + hyprland-protocols = { url = "github:hyprwm/hyprland-protocols"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/nix/default.nix b/nix/default.nix index 66ea53a6..c4650d3c 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -8,6 +8,7 @@ binutils, cairo, git, + hyprcursor, hyprland-protocols, hyprlang, jq, @@ -32,7 +33,6 @@ enableXWayland ? true, legacyRenderer ? false, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, - wrapRuntimeDeps ? true, version ? "git", commit, date, @@ -75,6 +75,7 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov [ cairo git + hyprcursor.dev hyprland-protocols hyprlang libdrm diff --git a/nix/overlays.nix b/nix/overlays.nix index 0a84d93e..c216ff53 100644 --- a/nix/overlays.nix +++ b/nix/overlays.nix @@ -21,6 +21,7 @@ in { # Packages for variations of Hyprland, dependencies included. hyprland-packages = lib.composeManyExtensions [ # Dependencies + inputs.hyprcursor.overlays.default inputs.hyprland-protocols.overlays.default inputs.hyprlang.overlays.default self.overlays.wlroots-hyprland diff --git a/nix/patches/meson-build.patch b/nix/patches/meson-build.patch index aefbf1bc..7f372107 100644 --- a/nix/patches/meson-build.patch +++ b/nix/patches/meson-build.patch @@ -37,15 +37,16 @@ diff --git a/src/meson.build b/src/meson.build index 45701f5f..3505cefe 100644 --- a/src/meson.build +++ b/src/meson.build -@@ -9,17 +9,17 @@ executable('Hyprland', src, +@@ -9,7 +9,7 @@ executable('Hyprland', src, server_protos, dependency('wayland-server'), dependency('wayland-client'), - wlroots.get_variable('wlroots'), + dependency('wlroots'), dependency('cairo'), + dependency('hyprcursor'), dependency('hyprlang', version: '>= 0.3.2'), - dependency('libdrm'), +@@ -16,12 +16,12 @@ executable('Hyprland', src, dependency('egl'), dependency('xkbcommon'), dependency('libinput'), diff --git a/src/meson.build b/src/meson.build index 2d72280c..59771fcf 100644 --- a/src/meson.build +++ b/src/meson.build @@ -11,6 +11,7 @@ executable('Hyprland', src, dependency('wayland-client'), wlroots.get_variable('wlroots'), dependency('cairo'), + dependency('hyprcursor'), dependency('hyprlang', version: '>= 0.3.2'), dependency('libdrm'), dependency('egl'),