2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2024-04-21 15:54:59 +00:00
|
|
|
, brightnessctl
|
2023-08-04 22:07:22 +00:00
|
|
|
, cargo
|
|
|
|
, coreutils
|
2023-05-24 13:37:59 +00:00
|
|
|
, gtk-layer-shell
|
2023-08-04 22:07:22 +00:00
|
|
|
, libevdev
|
|
|
|
, libinput
|
2023-05-24 13:37:59 +00:00
|
|
|
, libpulseaudio
|
2023-08-04 22:07:22 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, rustc
|
2024-04-21 15:54:59 +00:00
|
|
|
, sassc
|
2023-08-04 22:07:22 +00:00
|
|
|
, stdenv
|
|
|
|
, udev
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2023-05-24 13:37:59 +00:00
|
|
|
pname = "swayosd";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0-unstable-2024-04-15";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ErikReider";
|
|
|
|
repo = "SwayOSD";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "11271760052c4a4a4057f2d287944d74e8fbdb58";
|
|
|
|
hash = "sha256-qOxnl2J+Ivx/TIqodv3a8nP0JQsYoKIrhqnbD9IxU8g=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-exbVanUvGp0ub4WE3VcsN8hkcK0Ipf0tNfd92UecICg=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2023-05-24 13:37:59 +00:00
|
|
|
pkg-config
|
2023-08-04 22:07:22 +00:00
|
|
|
meson
|
|
|
|
rustc
|
|
|
|
cargo
|
|
|
|
ninja
|
|
|
|
rustPlatform.cargoSetupHook
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk-layer-shell
|
2023-08-04 22:07:22 +00:00
|
|
|
libevdev
|
|
|
|
libinput
|
2023-05-24 13:37:59 +00:00
|
|
|
libpulseaudio
|
2023-08-04 22:07:22 +00:00
|
|
|
udev
|
2024-04-21 15:54:59 +00:00
|
|
|
sassc
|
2023-08-04 22:07:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./swayosd_systemd_paths.patch
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ brightnessctl ]}
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace data/udev/99-swayosd.rules \
|
|
|
|
--replace /bin/chgrp ${coreutils}/bin/chgrp \
|
|
|
|
--replace /bin/chmod ${coreutils}/bin/chmod
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "GTK based on screen display for keyboard shortcuts";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://github.com/ErikReider/SwayOSD";
|
|
|
|
license = licenses.gpl3Plus;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ aleksana barab-i sergioribera ];
|
2023-05-24 13:37:59 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|