Meson & Nix: build with hyprlang

This commit is contained in:
Mihai Fufezan 2024-02-09 09:53:57 +02:00
parent 1713221ba2
commit b0159a73f4
No known key found for this signature in database
6 changed files with 35 additions and 4 deletions

View file

@ -24,6 +24,26 @@
} }
}, },
"hyprlang": { "hyprlang": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1707453316,
"narHash": "sha256-5rE0VX2c95Dtnn420OCmI4rRtW2SEC1+J6AQKg1IoUc=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "ab007915f7ede0e47fb922496f21e3210d165df2",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprlang_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"xdph", "xdph",
@ -63,6 +83,7 @@
"root": { "root": {
"inputs": { "inputs": {
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"systems": "systems", "systems": "systems",
"wlroots": "wlroots", "wlroots": "wlroots",
@ -108,7 +129,7 @@
"hyprland-protocols": [ "hyprland-protocols": [
"hyprland-protocols" "hyprland-protocols"
], ],
"hyprlang": "hyprlang", "hyprlang": "hyprlang_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],

View file

@ -22,6 +22,11 @@
inputs.systems.follows = "systems"; inputs.systems.follows = "systems";
}; };
hyprlang = {
url = "github:hyprwm/hyprlang";
inputs.nixpkgs.follows = "nixpkgs";
};
xdph = { xdph = {
url = "github:hyprwm/xdg-desktop-portal-hyprland"; url = "github:hyprwm/xdg-desktop-portal-hyprland";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -86,7 +91,7 @@
name = "hyprland-shell"; name = "hyprland-shell";
nativeBuildInputs = with pkgsFor.${system}; [cmake python3]; nativeBuildInputs = with pkgsFor.${system}; [cmake python3];
buildInputs = [self.packages.${system}.wlroots-hyprland]; buildInputs = [self.packages.${system}.wlroots-hyprland];
hardeningDisable = [ "fortify" ]; hardeningDisable = ["fortify"];
inputsFrom = [ inputsFrom = [
self.packages.${system}.wlroots-hyprland self.packages.${system}.wlroots-hyprland
self.packages.${system}.hyprland self.packages.${system}.hyprland

View file

@ -9,6 +9,7 @@
cairo, cairo,
git, git,
hyprland-protocols, hyprland-protocols,
hyprlang,
jq, jq,
libGL, libGL,
libdrm, libdrm,
@ -75,6 +76,7 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov
cairo cairo
git git
hyprland-protocols hyprland-protocols
hyprlang
libdrm libdrm
libGL libGL
libinput libinput

View file

@ -22,6 +22,7 @@ in {
hyprland-packages = lib.composeManyExtensions [ hyprland-packages = lib.composeManyExtensions [
# Dependencies # Dependencies
inputs.hyprland-protocols.overlays.default inputs.hyprland-protocols.overlays.default
inputs.hyprlang.overlays.default
self.overlays.wlroots-hyprland self.overlays.wlroots-hyprland
self.overlays.udis86 self.overlays.udis86
# Hyprland packages themselves # Hyprland packages themselves

View file

@ -34,16 +34,17 @@ index 1d2c7f9f..c5ef4e67 100644
headers = globber.stdout().strip().split('\n') headers = globber.stdout().strip().split('\n')
foreach file : headers foreach file : headers
diff --git a/src/meson.build b/src/meson.build diff --git a/src/meson.build b/src/meson.build
index 0af864b9..38723b8c 100644 index 45701f5f..3505cefe 100644
--- a/src/meson.build --- a/src/meson.build
+++ b/src/meson.build +++ b/src/meson.build
@@ -9,16 +9,16 @@ executable('Hyprland', src, @@ -9,17 +9,17 @@ executable('Hyprland', src,
server_protos, server_protos,
dependency('wayland-server'), dependency('wayland-server'),
dependency('wayland-client'), dependency('wayland-client'),
- wlroots.get_variable('wlroots'), - wlroots.get_variable('wlroots'),
+ dependency('wlroots'), + dependency('wlroots'),
dependency('cairo'), dependency('cairo'),
dependency('hyprlang', version: '>= 0.2.1'),
dependency('libdrm'), dependency('libdrm'),
dependency('egl'), dependency('egl'),
dependency('xkbcommon'), dependency('xkbcommon'),

View file

@ -11,6 +11,7 @@ executable('Hyprland', src,
dependency('wayland-client'), dependency('wayland-client'),
wlroots.get_variable('wlroots'), wlroots.get_variable('wlroots'),
dependency('cairo'), dependency('cairo'),
dependency('hyprlang', version: '>= 0.2.1'),
dependency('libdrm'), dependency('libdrm'),
dependency('egl'), dependency('egl'),
dependency('xkbcommon'), dependency('xkbcommon'),