mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-24 15:15:58 +01:00
nix & meson: add hyprland-protocols through pkgconfig (#14)
This commit is contained in:
parent
e47f4cec69
commit
b03b1c2f27
8 changed files with 17 additions and 18 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -1,3 +1,3 @@
|
|||
[submodule "protocols/hyprland-protocols"]
|
||||
path = protocols/hyprland-protocols
|
||||
[submodule "hyprland-protocols"]
|
||||
path = subprojects/hyprland-protocols
|
||||
url = https://github.com/hyprwm/hyprland-protocols
|
||||
|
|
12
flake.lock
12
flake.lock
|
@ -1,13 +1,17 @@
|
|||
{
|
||||
"nodes": {
|
||||
"hyprland-protocols": {
|
||||
"flake": false,
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1670703428,
|
||||
"narHash": "sha256-4KUW5SKR0Y9uaYGcYwy53YJ3B/sgiprCL4fRGO+mpOA=",
|
||||
"lastModified": 1671839510,
|
||||
"narHash": "sha256-+PY1qqJfmZzzROgcIY4I7AkCwpnC+qBIYk2eFoA9RWc=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "d0d6db8cb5bef6d93ca3ad8fb2124964173396da",
|
||||
"rev": "b8f55e02a328c47ed373133c52483bbfa20a1b75",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
hyprland-protocols = {
|
||||
url = "github:hyprwm/hyprland-protocols";
|
||||
flake = false;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
overlays.default = _: prev: rec {
|
||||
xdg-desktop-portal-hyprland = prev.callPackage ./nix/default.nix {
|
||||
stdenv = prev.gcc12Stdenv;
|
||||
inherit (inputs) hyprland-protocols;
|
||||
inherit (inputs.hyprland-protocols.packages.${prev.hostPlatform.system}) hyprland-protocols;
|
||||
inherit hyprland-share-picker version;
|
||||
};
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ inc = include_directories('include')
|
|||
|
||||
rt = cc.find_library('rt')
|
||||
pipewire = dependency('libpipewire-0.3', version: '>= 0.3.41')
|
||||
hyprland_protos = dependency('hyprland-protocols', version: '>=0.1', fallback: 'hyprland-protocols')
|
||||
wayland_client = dependency('wayland-client')
|
||||
wayland_protos = dependency('wayland-protocols', version: '>=1.24')
|
||||
iniparser = dependency('inih')
|
||||
|
|
|
@ -28,14 +28,7 @@ stdenv.mkDerivation {
|
|||
strictDeps = true;
|
||||
depsBuildBuild = [pkg-config];
|
||||
nativeBuildInputs = [meson ninja pkg-config wayland-scanner makeWrapper];
|
||||
buildInputs = [inih libdrm mesa pipewire systemd wayland wayland-protocols];
|
||||
|
||||
preConfigure = ''
|
||||
# for some reason rmdir doesn't work in a dirty tree
|
||||
rmdir protocols/hyprland-protocols || true
|
||||
|
||||
ln -s ${hyprland-protocols.outPath}/ protocols/hyprland-protocols
|
||||
'';
|
||||
buildInputs = [hyprland-protocols inih libdrm mesa pipewire systemd wayland wayland-protocols];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dsd-bus-provider=libsystemd"
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 301733ae466b229066ba15a53e6d8b91c5dcef5b
|
|
@ -1,4 +1,5 @@
|
|||
wl_protocol_dir = wayland_protos.get_variable('pkgdatadir')
|
||||
hl_protocol_dir = hyprland_protos.get_variable('pkgdatadir')
|
||||
|
||||
wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)
|
||||
if wayland_scanner_dep.found()
|
||||
|
@ -13,9 +14,9 @@ endif
|
|||
client_protocols = [
|
||||
wl_protocol_dir / 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml',
|
||||
wl_protocol_dir / 'unstable/xdg-output/xdg-output-unstable-v1.xml',
|
||||
hl_protocol_dir / 'protocols/hyprland-toplevel-export-v1.xml',
|
||||
'wlr-screencopy-unstable-v1.xml',
|
||||
'wlr-foreign-toplevel-management-unstable-v1.xml',
|
||||
'hyprland-protocols/protocols/hyprland-toplevel-export-v1.xml'
|
||||
]
|
||||
|
||||
wl_proto_files = []
|
||||
|
|
1
subprojects/hyprland-protocols
Submodule
1
subprojects/hyprland-protocols
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit b8f55e02a328c47ed373133c52483bbfa20a1b75
|
Loading…
Reference in a new issue