mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-22 14:35:57 +01:00
nix: wrap hyprland-share-picker with hyprland in PATH
This commit is contained in:
parent
756789211e
commit
5f7eecff55
3 changed files with 36 additions and 32 deletions
|
@ -26,12 +26,15 @@
|
||||||
(builtins.substring 4 2 longDate)
|
(builtins.substring 4 2 longDate)
|
||||||
(builtins.substring 6 2 longDate)
|
(builtins.substring 6 2 longDate)
|
||||||
]);
|
]);
|
||||||
in {
|
|
||||||
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");
|
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||||
|
in {
|
||||||
|
overlays.default = _: prev: rec {
|
||||||
|
xdg-desktop-portal-hyprland = prev.callPackage ./nix/default.nix {
|
||||||
inherit (inputs) hyprland-protocols;
|
inherit (inputs) hyprland-protocols;
|
||||||
|
inherit hyprland-share-picker version;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hyprland-share-picker = prev.libsForQt5.callPackage ./nix/hyprland-share-picker.nix {inherit version;};
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = genSystems (system:
|
packages = genSystems (system:
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
pkg-config,
|
pkg-config,
|
||||||
wayland-protocols,
|
wayland-protocols,
|
||||||
wayland-scanner,
|
wayland-scanner,
|
||||||
|
hyprland-share-picker,
|
||||||
hyprland-protocols,
|
hyprland-protocols,
|
||||||
inih,
|
inih,
|
||||||
libdrm,
|
libdrm,
|
||||||
|
@ -17,9 +18,7 @@
|
||||||
wayland,
|
wayland,
|
||||||
libsForQt5,
|
libsForQt5,
|
||||||
version ? "git",
|
version ? "git",
|
||||||
}: let
|
}:
|
||||||
hyprland-share-picker = libsForQt5.callPackage ./hyprland-share-picker.nix {inherit version;};
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "xdg-desktop-portal-hyprland";
|
pname = "xdg-desktop-portal-hyprland";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
@ -32,7 +31,8 @@ in
|
||||||
buildInputs = [inih libdrm mesa pipewire systemd wayland wayland-protocols];
|
buildInputs = [inih libdrm mesa pipewire systemd wayland wayland-protocols];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
rmdir protocols/hyprland-protocols
|
# for some reason rmdir doesn't work in a dirty tree
|
||||||
|
rmdir protocols/hyprland-protocols || true
|
||||||
|
|
||||||
ln -s ${hyprland-protocols.outPath}/ protocols/hyprland-protocols
|
ln -s ${hyprland-protocols.outPath}/ protocols/hyprland-protocols
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
qtbase,
|
qtbase,
|
||||||
makeShellWrapper,
|
makeShellWrapper,
|
||||||
wrapQtAppsHook,
|
wrapQtAppsHook,
|
||||||
|
hyprland,
|
||||||
slurp,
|
slurp,
|
||||||
version ? "git",
|
version ? "git",
|
||||||
...
|
...
|
||||||
|
@ -22,6 +23,6 @@ stdenv.mkDerivation {
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgramShell $out/bin/hyprland-share-picker \
|
wrapProgramShell $out/bin/hyprland-share-picker \
|
||||||
"''${qtWrapperArgs[@]}" \
|
"''${qtWrapperArgs[@]}" \
|
||||||
--prefix PATH ":" ${lib.makeBinPath [slurp]}
|
--prefix PATH ":" ${lib.makeBinPath [slurp hyprland]}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue