2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, wrapGAppsHook
|
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
|
|
|
|
, 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-01-02 11:29:13 +00:00
|
|
|
version = "unstable-2023-09-26";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ErikReider";
|
|
|
|
repo = "SwayOSD";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "1c7d2f5b3ee262f25bdd3c899eadf17efb656d26";
|
|
|
|
hash = "sha256-Y22O6Ktya/WIhidnoyxnZu5YvXWNmSS6vecDU8zDD34=";
|
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-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-tqbMlygX+n14oR1t+0ngjiSG2mHUk/NbiWHk4yEAb2o=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./swayosd_systemd_paths.patch
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
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; {
|
|
|
|
description = "A GTK based on screen display for keyboard shortcuts";
|
|
|
|
homepage = "https://github.com/ErikReider/SwayOSD";
|
|
|
|
license = licenses.gpl3Plus;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ aleksana barab-i ];
|
2023-05-24 13:37:59 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|