mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-05 16:25:59 +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": {
|
||||
"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": {
|
||||
"locked": {
|
||||
"lastModified": 1669969257,
|
||||
|
@ -18,6 +34,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": "hyprland-protocols",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
|
|
12
flake.nix
12
flake.nix
|
@ -1,13 +1,20 @@
|
|||
{
|
||||
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 = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
}: let
|
||||
} @ inputs: let
|
||||
inherit (nixpkgs) lib;
|
||||
genSystems = lib.genAttrs [
|
||||
"aarch64-linux"
|
||||
|
@ -23,6 +30,7 @@
|
|||
overlays.default = _: prev: {
|
||||
xdg-desktop-portal-hyprland = prev.callPackage ./nix/default.nix {
|
||||
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],
|
||||
install: true,
|
||||
install_dir: 'libexecdir',
|
||||
install_dir: get_option('libexecdir'),
|
||||
)
|
||||
|
||||
conf_data = configuration_data()
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
wayland-protocols,
|
||||
wayland-scanner,
|
||||
grim,
|
||||
hyprland-protocols,
|
||||
inih,
|
||||
libdrm,
|
||||
mesa,
|
||||
|
@ -32,6 +33,12 @@ in
|
|||
nativeBuildInputs = [meson ninja pkg-config wayland-scanner makeWrapper];
|
||||
buildInputs = [inih libdrm mesa pipewire systemd wayland wayland-protocols];
|
||||
|
||||
preConfigure = ''
|
||||
rmdir protocols/hyprland-protocols
|
||||
|
||||
ln -s ${hyprland-protocols.outPath}/ protocols/hyprland-protocols
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
"-Dsd-bus-provider=libsystemd"
|
||||
];
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
lib,
|
||||
cmake,
|
||||
qtbase,
|
||||
makeShellWrapper,
|
||||
wrapQtAppsHook,
|
||||
grim,
|
||||
slurp,
|
||||
version ? "git",
|
||||
...
|
||||
}:
|
||||
|
@ -12,6 +15,14 @@ stdenv.mkDerivation {
|
|||
inherit version;
|
||||
src = ../hyprland-share-picker;
|
||||
|
||||
nativeBuildInputs = [cmake wrapQtAppsHook];
|
||||
nativeBuildInputs = [cmake wrapQtAppsHook makeShellWrapper];
|
||||
buildInputs = [qtbase];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
postInstall = ''
|
||||
wrapProgramShell $out/bin/hyprland-share-picker \
|
||||
"''${qtWrapperArgs[@]}" \
|
||||
--prefix PATH ":" ${lib.makeBinPath [grim slurp]}
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue