slackdump: 3.0.3 -> 3.0.5 (#379390)
[NixPkgs.git] / pkgs / by-name / sw / swayosd / package.nix
blob1b4d736f56cab972875a54181c941251b59cbf62
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   pkg-config,
6   wrapGAppsHook3,
7   brightnessctl,
8   cargo,
9   coreutils,
10   gtk-layer-shell,
11   libevdev,
12   libinput,
13   libpulseaudio,
14   meson,
15   ninja,
16   rustc,
17   sassc,
18   stdenv,
19   udev,
21 stdenv.mkDerivation rec {
22   pname = "swayosd";
23   version = "0.1.0";
25   src = fetchFromGitHub {
26     owner = "ErikReider";
27     repo = "SwayOSD";
28     rev = "v${version}";
29     hash = "sha256-GyvRWEzTxQxTAk+xCLFsHdd1SttBliOgJ6eZqAxQMME=";
30   };
32   cargoDeps = rustPlatform.fetchCargoTarball {
33     inherit pname version src;
34     hash = "sha256-EUxJ+aGtYAO0kNggNXIZqj2DmPzc4serj0/V+fvH7ds=";
35   };
37   nativeBuildInputs = [
38     wrapGAppsHook3
39     pkg-config
40     meson
41     rustc
42     cargo
43     ninja
44     rustPlatform.cargoSetupHook
45   ];
47   buildInputs = [
48     gtk-layer-shell
49     libevdev
50     libinput
51     libpulseaudio
52     udev
53     sassc
54   ];
56   patches = [
57     ./swayosd_systemd_paths.patch
58   ];
60   preFixup = ''
61     gappsWrapperArgs+=(
62       --prefix PATH : ${lib.makeBinPath [ brightnessctl ]}
63     )
64   '';
66   postPatch = ''
67     substituteInPlace data/udev/99-swayosd.rules \
68       --replace /bin/chgrp ${coreutils}/bin/chgrp \
69       --replace /bin/chmod ${coreutils}/bin/chmod
70   '';
72   meta = with lib; {
73     description = "GTK based on screen display for keyboard shortcuts";
74     homepage = "https://github.com/ErikReider/SwayOSD";
75     license = licenses.gpl3Plus;
76     maintainers = with maintainers; [
77       aleksana
78       barab-i
79       sergioribera
80     ];
81     platforms = platforms.linux;
82   };