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.

81 lines
1.5 KiB
Nix
Raw Normal View History

2023-05-09 13:31:00 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, wrapGAppsHook3
, brightnessctl
, cargo
, coreutils
2023-05-09 13:31:00 +00:00
, gtk-layer-shell
, libevdev
, libinput
2023-05-09 13:31:00 +00:00
, libpulseaudio
, meson
, ninja
, rustc
, sassc
, stdenv
, udev
2023-05-09 13:31:00 +00:00
}:
stdenv.mkDerivation rec {
2023-05-09 13:31:00 +00:00
pname = "swayosd";
version = "0-unstable-2024-04-15";
2023-05-09 13:31:00 +00:00
src = fetchFromGitHub {
owner = "ErikReider";
repo = "SwayOSD";
rev = "11271760052c4a4a4057f2d287944d74e8fbdb58";
hash = "sha256-qOxnl2J+Ivx/TIqodv3a8nP0JQsYoKIrhqnbD9IxU8g=";
2023-05-09 13:31:00 +00:00
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-exbVanUvGp0ub4WE3VcsN8hkcK0Ipf0tNfd92UecICg=";
};
2023-05-09 13:31:00 +00:00
2023-05-18 13:24:45 +00:00
nativeBuildInputs = [
wrapGAppsHook3
2023-05-18 13:24:45 +00:00
pkg-config
meson
rustc
cargo
ninja
rustPlatform.cargoSetupHook
2023-05-18 13:24:45 +00:00
];
2023-05-09 13:31:00 +00:00
buildInputs = [
gtk-layer-shell
libevdev
libinput
2023-05-09 13:31:00 +00:00
libpulseaudio
udev
sassc
2023-05-09 13:31:00 +00: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 13:31:00 +00:00
meta = with lib; {
description = "A GTK based on screen display for keyboard shortcuts";
homepage = "https://github.com/ErikReider/SwayOSD";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ aleksana barab-i sergioribera ];
2023-05-09 13:31:00 +00:00
platforms = platforms.linux;
};
}