Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / sw / swayosd / package.nix
blobf7f5c84d204b4a12578b970db0bca4e3c07cc812
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , pkg-config
5 , wrapGAppsHook3
6 , brightnessctl
7 , cargo
8 , coreutils
9 , gtk-layer-shell
10 , libevdev
11 , libinput
12 , libpulseaudio
13 , meson
14 , ninja
15 , rustc
16 , sassc
17 , stdenv
18 , udev
21 stdenv.mkDerivation rec {
22   pname = "swayosd";
23   version = "0-unstable-2024-04-15";
25   src = fetchFromGitHub {
26     owner = "ErikReider";
27     repo = "SwayOSD";
28     rev = "11271760052c4a4a4057f2d287944d74e8fbdb58";
29     hash = "sha256-qOxnl2J+Ivx/TIqodv3a8nP0JQsYoKIrhqnbD9IxU8g=";
30   };
32   cargoDeps = rustPlatform.fetchCargoTarball {
33     inherit src;
34     name = "${pname}-${version}";
35     hash = "sha256-exbVanUvGp0ub4WE3VcsN8hkcK0Ipf0tNfd92UecICg=";
36   };
38   nativeBuildInputs = [
39     wrapGAppsHook3
40     pkg-config
41     meson
42     rustc
43     cargo
44     ninja
45     rustPlatform.cargoSetupHook
46   ];
48   buildInputs = [
49     gtk-layer-shell
50     libevdev
51     libinput
52     libpulseaudio
53     udev
54     sassc
55   ];
57   patches = [
58     ./swayosd_systemd_paths.patch
59   ];
61   preFixup = ''
62     gappsWrapperArgs+=(
63       --prefix PATH : ${lib.makeBinPath [ brightnessctl ]}
64     )
65   '';
67   postPatch = ''
68     substituteInPlace data/udev/99-swayosd.rules \
69       --replace /bin/chgrp ${coreutils}/bin/chgrp \
70       --replace /bin/chmod ${coreutils}/bin/chmod
71   '';
73   meta = with lib; {
74     description = "GTK based on screen display for keyboard shortcuts";
75     homepage = "https://github.com/ErikReider/SwayOSD";
76     license = licenses.gpl3Plus;
77     maintainers = with maintainers; [ aleksana barab-i sergioribera ];
78     platforms = platforms.linux;
79   };