forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / ga / galaxy-buds-client / package.nix
blob4d62d74aec09b274a2f99d7e7fb195ce82ce076f
1 { lib
2 , stdenv
3 , buildDotnetModule
4 , fetchFromGitHub
5 , dotnetCorePackages
6 , fontconfig
7 , glib
8 , libglvnd
9 , xorg
10 , makeWrapper
11 , makeDesktopItem
12 , copyDesktopItems
15 buildDotnetModule rec {
16   pname = "galaxy-buds-client";
17   version = "5.1.0";
19   src = fetchFromGitHub {
20     owner = "ThePBone";
21     repo = "GalaxyBudsClient";
22     rev = version;
23     hash = "sha256-9m9H0T4rD6HIvb15h7+Q7SgLk0PkISkN8ojjh7nsiwA=";
24   };
26   projectFile = [ "GalaxyBudsClient/GalaxyBudsClient.csproj" ];
27   nugetDeps = ./deps.nix;
28   dotnet-sdk = dotnetCorePackages.sdk_8_0;
29   dotnet-runtime = dotnetCorePackages.runtime_8_0;
30   dotnetFlags = [ "-p:Runtimeidentifier=linux-x64" ];
32   nativeBuildInputs = [ makeWrapper copyDesktopItems ];
34   buildInputs = [ (lib.getLib stdenv.cc.cc) fontconfig ];
36   runtimeDeps = [
37     libglvnd
38     xorg.libSM
39     xorg.libICE
40     xorg.libX11
41   ];
43   postFixup = ''
44     wrapProgram "$out/bin/GalaxyBudsClient" \
45       --prefix PATH : ${glib.bin}/bin
47     mkdir -p $out/share/icons/hicolor/256x256/apps/
48     cp -r $src/GalaxyBudsClient/Resources/icon.png $out/share/icons/hicolor/256x256/apps/${meta.mainProgram}.png
49   '';
51   desktopItems = [
52     (makeDesktopItem {
53       name = meta.mainProgram;
54       exec = meta.mainProgram;
55       icon = meta.mainProgram;
56       desktopName = meta.mainProgram;
57       genericName = "Galaxy Buds Client";
58       comment = meta.description;
59       type = "Application";
60       categories = [ "Settings" ];
61       startupNotify = true;
62     })
63   ];
65   meta = with lib; {
66     mainProgram = "GalaxyBudsClient";
67     description = "Unofficial Galaxy Buds Manager for Windows and Linux";
68     homepage = "https://github.com/ThePBone/GalaxyBudsClient";
69     license = licenses.gpl3;
70     maintainers = [ maintainers.icy-thought ];
71     platforms = platforms.linux;
72   };