nixpkgs/pkgs/by-name/sw/swayosd/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

84 lines
1.5 KiB
Nix
Raw Normal View History

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
}:
stdenv.mkDerivation rec {
2023-05-09 07:31:00 -06:00
pname = "swayosd";
version = "0.1.0";
2023-05-09 07:31:00 -06:00
src = fetchFromGitHub {
owner = "ErikReider";
repo = "SwayOSD";
rev = "v${version}";
hash = "sha256-GyvRWEzTxQxTAk+xCLFsHdd1SttBliOgJ6eZqAxQMME=";
2023-05-09 07:31:00 -06:00
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit pname version src;
hash = "sha256-EUxJ+aGtYAO0kNggNXIZqj2DmPzc4serj0/V+fvH7ds=";
};
2023-05-09 07:31:00 -06:00
2023-05-18 07:24:45 -06:00
nativeBuildInputs = [
wrapGAppsHook3
2023-05-18 07:24:45 -06:00
pkg-config
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
libevdev
libinput
2023-05-09 07:31:00 -06:00
libpulseaudio
udev
sassc
2023-05-09 07:31:00 -06:00
];
patches = [
./swayosd_systemd_paths.patch
];
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH : ${lib.makeBinPath [brightnessctl]}
)
'';
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;
};
}