nixpkgs/pkgs/by-name/go/go-musicfox/package.nix
2024-11-21 18:09:01 +08:00

61 lines
1.1 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
pkg-config,
flac,
stdenv,
alsa-lib,
nix-update-script,
}:
buildGoModule rec {
pname = "go-musicfox";
version = "4.5.7";
src = fetchFromGitHub {
owner = "go-musicfox";
repo = "go-musicfox";
rev = "v${version}";
hash = "sha256-x3j+gfPRPkDJq9dF2NZBqvRWhnthQ8Y1TUE6xV0qFVU=";
};
deleteVendor = true;
vendorHash = "sha256-ItZMt6LLOQ/ZRBKAGjD72cTzK39l/ffXpXbODm9MCh8=";
subPackages = [ "cmd/musicfox.go" ];
ldflags = [
"-s"
"-w"
"-X github.com/go-musicfox/go-musicfox/internal/types.AppVersion=${version}"
];
nativeBuildInputs = [
pkg-config
];
buildInputs =
[
flac
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Terminal netease cloud music client written in Go";
homepage = "https://github.com/anhoder/go-musicfox";
license = lib.licenses.mit;
mainProgram = "musicfox";
maintainers = with lib.maintainers; [
zendo
Ruixi-rebirth
aleksana
];
};
}