2024-11-03 23:23:57 -07:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pkg-config,
|
|
|
|
wrapGAppsHook3,
|
|
|
|
brightnessctl,
|
|
|
|
cargo,
|
|
|
|
coreutils,
|
|
|
|
gtk-layer-shell,
|
|
|
|
libevdev,
|
|
|
|
libinput,
|
|
|
|
libpulseaudio,
|
|
|
|
meson,
|
|
|
|
ninja,
|
|
|
|
rustc,
|
|
|
|
sassc,
|
|
|
|
stdenv,
|
|
|
|
udev,
|
2023-05-09 07:31:00 -06:00
|
|
|
}:
|
2023-07-22 11:40:26 -06:00
|
|
|
stdenv.mkDerivation rec {
|
2023-05-09 07:31:00 -06:00
|
|
|
pname = "swayosd";
|
2024-11-03 23:24:45 -07:00
|
|
|
version = "0.1.0";
|
2023-05-09 07:31:00 -06:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ErikReider";
|
|
|
|
repo = "SwayOSD";
|
2024-11-03 23:24:45 -07:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-GyvRWEzTxQxTAk+xCLFsHdd1SttBliOgJ6eZqAxQMME=";
|
2023-05-09 07:31:00 -06:00
|
|
|
};
|
|
|
|
|
2023-07-22 11:40:26 -06:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
2024-11-03 23:24:45 -07:00
|
|
|
inherit pname version src;
|
|
|
|
hash = "sha256-EUxJ+aGtYAO0kNggNXIZqj2DmPzc4serj0/V+fvH7ds=";
|
2023-07-22 11:40:26 -06:00
|
|
|
};
|
2023-05-09 07:31:00 -06:00
|
|
|
|
2023-05-18 07:24:45 -06:00
|
|
|
nativeBuildInputs = [
|
2024-04-26 14:24:03 -06:00
|
|
|
wrapGAppsHook3
|
2023-05-18 07:24:45 -06:00
|
|
|
pkg-config
|
2023-07-22 11:40:26 -06:00
|
|
|
meson
|
|
|
|
rustc
|
|
|
|
cargo
|
|
|
|
ninja
|
|
|
|
rustPlatform.cargoSetupHook
|
2023-05-18 07:24:45 -06:00
|
|
|
];
|
2023-05-09 07:31:00 -06:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk-layer-shell
|
2023-07-20 23:48:38 -06:00
|
|
|
libevdev
|
|
|
|
libinput
|
2023-05-09 07:31:00 -06:00
|
|
|
libpulseaudio
|
2023-07-20 23:48:38 -06:00
|
|
|
udev
|
2024-04-20 23:03:13 -06:00
|
|
|
sassc
|
2023-05-09 07:31:00 -06:00
|
|
|
];
|
|
|
|
|
2023-07-22 11:40:26 -06:00
|
|
|
patches = [
|
|
|
|
./swayosd_systemd_paths.patch
|
|
|
|
];
|
|
|
|
|
2024-04-20 23:03:13 -06:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
2024-11-03 23:24:45 -07:00
|
|
|
--prefix PATH : ${lib.makeBinPath [brightnessctl]}
|
2024-04-20 23:03:13 -06:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2023-07-22 11:40:26 -06:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace data/udev/99-swayosd.rules \
|
|
|
|
--replace /bin/chgrp ${coreutils}/bin/chgrp \
|
|
|
|
--replace /bin/chmod ${coreutils}/bin/chmod
|
|
|
|
'';
|
|
|
|
|
2023-05-09 07:31:00 -06:00
|
|
|
meta = with lib; {
|
|
|
|
description = "GTK based on screen display for keyboard shortcuts";
|
|
|
|
homepage = "https://github.com/ErikReider/SwayOSD";
|
|
|
|
license = licenses.gpl3Plus;
|
2024-11-03 23:23:57 -07:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
aleksana
|
|
|
|
barab-i
|
|
|
|
sergioribera
|
|
|
|
];
|
2023-05-09 07:31:00 -06:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|