mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
74 lines
1.8 KiB
Nix
74 lines
1.8 KiB
Nix
{ lib
|
|
, stdenv
|
|
, buildDotnetModule
|
|
, fetchFromGitHub
|
|
, dotnetCorePackages
|
|
, fontconfig
|
|
, glib
|
|
, libglvnd
|
|
, xorg
|
|
, makeWrapper
|
|
, makeDesktopItem
|
|
, copyDesktopItems
|
|
}:
|
|
|
|
buildDotnetModule rec {
|
|
pname = "galaxy-buds-client";
|
|
version = "5.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ThePBone";
|
|
repo = "GalaxyBudsClient";
|
|
rev = version;
|
|
hash = "sha256-9m9H0T4rD6HIvb15h7+Q7SgLk0PkISkN8ojjh7nsiwA=";
|
|
};
|
|
|
|
projectFile = [ "GalaxyBudsClient/GalaxyBudsClient.csproj" ];
|
|
nugetDeps = ./deps.nix;
|
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
|
dotnet-runtime = dotnetCorePackages.runtime_8_0;
|
|
dotnetFlags = [ "-p:Runtimeidentifier=linux-x64" ];
|
|
|
|
nativeBuildInputs = [ makeWrapper copyDesktopItems ];
|
|
|
|
buildInputs = [ (lib.getLib stdenv.cc.cc) fontconfig ];
|
|
|
|
runtimeDeps = [
|
|
libglvnd
|
|
xorg.libSM
|
|
xorg.libICE
|
|
xorg.libX11
|
|
];
|
|
|
|
postFixup = ''
|
|
wrapProgram "$out/bin/GalaxyBudsClient" \
|
|
--prefix PATH : ${glib.bin}/bin
|
|
|
|
mkdir -p $out/share/icons/hicolor/256x256/apps/
|
|
cp -r $src/GalaxyBudsClient/Resources/icon.png $out/share/icons/hicolor/256x256/apps/${meta.mainProgram}.png
|
|
'';
|
|
|
|
desktopItems = [
|
|
(makeDesktopItem {
|
|
name = meta.mainProgram;
|
|
exec = meta.mainProgram;
|
|
icon = meta.mainProgram;
|
|
desktopName = meta.mainProgram;
|
|
genericName = "Galaxy Buds Client";
|
|
comment = meta.description;
|
|
type = "Application";
|
|
categories = [ "Settings" ];
|
|
startupNotify = true;
|
|
})
|
|
];
|
|
|
|
meta = with lib; {
|
|
mainProgram = "GalaxyBudsClient";
|
|
description = "Unofficial Galaxy Buds Manager for Windows and Linux";
|
|
homepage = "https://github.com/ThePBone/GalaxyBudsClient";
|
|
license = licenses.gpl3;
|
|
maintainers = [ maintainers.icy-thought ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|