mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-23 14:55:57 +01:00
nix: add hyprland-protocols and streamline build
This commit is contained in:
parent
6d6c5547b4
commit
3be001b747
5 changed files with 47 additions and 4 deletions
17
flake.lock
17
flake.lock
|
@ -1,5 +1,21 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"hyprland-protocols": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1670185345,
|
||||||
|
"narHash": "sha256-hxWGqlPecqEsE6nOHDV29KFBKePbY2Ipeac6lrChMKY=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-protocols",
|
||||||
|
"rev": "4623a404c091e64743ba310199bb380ec52f1936",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-protocols",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1669969257,
|
"lastModified": 1669969257,
|
||||||
|
@ -18,6 +34,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"hyprland-protocols": "hyprland-protocols",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
12
flake.nix
12
flake.nix
|
@ -1,13 +1,20 @@
|
||||||
{
|
{
|
||||||
description = "xdg-desktop-portal-hyprland";
|
description = "xdg-desktop-portal-hyprland";
|
||||||
|
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
hyprland-protocols = {
|
||||||
|
url = "github:hyprwm/hyprland-protocols";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
...
|
...
|
||||||
}: let
|
} @ inputs: let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
genSystems = lib.genAttrs [
|
genSystems = lib.genAttrs [
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
|
@ -23,6 +30,7 @@
|
||||||
overlays.default = _: prev: {
|
overlays.default = _: prev: {
|
||||||
xdg-desktop-portal-hyprland = prev.callPackage ./nix/default.nix {
|
xdg-desktop-portal-hyprland = prev.callPackage ./nix/default.nix {
|
||||||
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||||
|
inherit (inputs) hyprland-protocols;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ executable(
|
||||||
],
|
],
|
||||||
include_directories: [inc],
|
include_directories: [inc],
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: 'libexecdir',
|
install_dir: get_option('libexecdir'),
|
||||||
)
|
)
|
||||||
|
|
||||||
conf_data = configuration_data()
|
conf_data = configuration_data()
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
wayland-protocols,
|
wayland-protocols,
|
||||||
wayland-scanner,
|
wayland-scanner,
|
||||||
grim,
|
grim,
|
||||||
|
hyprland-protocols,
|
||||||
inih,
|
inih,
|
||||||
libdrm,
|
libdrm,
|
||||||
mesa,
|
mesa,
|
||||||
|
@ -32,6 +33,12 @@ in
|
||||||
nativeBuildInputs = [meson ninja pkg-config wayland-scanner makeWrapper];
|
nativeBuildInputs = [meson ninja pkg-config wayland-scanner makeWrapper];
|
||||||
buildInputs = [inih libdrm mesa pipewire systemd wayland wayland-protocols];
|
buildInputs = [inih libdrm mesa pipewire systemd wayland wayland-protocols];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
rmdir protocols/hyprland-protocols
|
||||||
|
|
||||||
|
ln -s ${hyprland-protocols.outPath}/ protocols/hyprland-protocols
|
||||||
|
'';
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dsd-bus-provider=libsystemd"
|
"-Dsd-bus-provider=libsystemd"
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
lib,
|
lib,
|
||||||
cmake,
|
cmake,
|
||||||
qtbase,
|
qtbase,
|
||||||
|
makeShellWrapper,
|
||||||
wrapQtAppsHook,
|
wrapQtAppsHook,
|
||||||
|
grim,
|
||||||
|
slurp,
|
||||||
version ? "git",
|
version ? "git",
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -12,6 +15,14 @@ stdenv.mkDerivation {
|
||||||
inherit version;
|
inherit version;
|
||||||
src = ../hyprland-share-picker;
|
src = ../hyprland-share-picker;
|
||||||
|
|
||||||
nativeBuildInputs = [cmake wrapQtAppsHook];
|
nativeBuildInputs = [cmake wrapQtAppsHook makeShellWrapper];
|
||||||
buildInputs = [qtbase];
|
buildInputs = [qtbase];
|
||||||
|
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgramShell $out/bin/hyprland-share-picker \
|
||||||
|
"''${qtWrapperArgs[@]}" \
|
||||||
|
--prefix PATH ":" ${lib.makeBinPath [grim slurp]}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue