streamlink: 7.1.1 -> 7.1.2 (#373269)
[NixPkgs.git] / pkgs / by-name / wl / wldash / package.nix
blob5b2aa6b6825af95a43337321fe42827b6cfb9643
2   lib,
3   alsa-lib,
4   dbus,
5   fetchFromGitHub,
6   fontconfig,
7   libpulseaudio,
8   libxkbcommon,
9   pkg-config,
10   rustPlatform,
11   wayland,
12   enableAlsaWidget ? true,
13   enablePulseaudioWidget ? true,
16 let
17   pname = "wldash";
18   version = "0.3.0";
19   libraryPath = lib.makeLibraryPath [
20     wayland
21     libxkbcommon
22   ];
24 rustPlatform.buildRustPackage {
25   inherit pname version;
27   buildNoDefaultFeatures = true;
28   buildFeatures =
29     [
30       "yaml-cfg"
31       "json-cfg"
32     ]
33     ++ lib.optionals enableAlsaWidget [ "alsa-widget" ]
34     ++ lib.optionals enablePulseaudioWidget [ "pulseaudio-widget" ];
36   src = fetchFromGitHub {
37     owner = "kennylevinsen";
38     repo = pname;
39     rev = "v${version}";
40     hash = "sha256-ZzsBD3KKTT+JGiFCpdumPyVAE2gEJvzCq+nRnK3RdxI=";
41   };
43   strictDeps = true;
45   nativeBuildInputs = [ pkg-config ];
46   buildInputs =
47     [
48       dbus
49       fontconfig
50     ]
51     ++ lib.optionals enableAlsaWidget [ alsa-lib ]
52     ++ lib.optionals enablePulseaudioWidget [ libpulseaudio ];
54   cargoPatches = [
55     ./0001-Update-Cargo.lock.patch
56     ./0002-Update-fontconfig.patch
57   ];
59   cargoHash = "sha256-Y7nhj8VpO6sEzVkM3uPv8Tlk2jPn3c/uPJqFc/HjHI0=";
61   dontPatchELF = true;
63   postInstall = ''
64     patchelf --set-rpath ${libraryPath}:$(patchelf --print-rpath $out/bin/wldash) $out/bin/wldash
65   '';
67   meta = {
68     description = "Wayland launcher/dashboard";
69     homepage = "https://github.com/kennylevinsen/wldash";
70     license = lib.licenses.gpl3;
71     maintainers = with lib.maintainers; [ bbenno ];
72     mainProgram = "wldash";
73     platforms = lib.platforms.linux;
74     sourceProvenance = with lib.sourceTypes; [ fromSource ];
75   };