2023-02-02 18:25:31 +00:00
|
|
|
{ lib
|
2024-01-25 14:12:00 +00:00
|
|
|
, buildGoModule
|
2023-04-29 16:46:19 +00:00
|
|
|
, fetchFromGitHub
|
2023-02-02 18:25:31 +00:00
|
|
|
, pkg-config
|
|
|
|
, flac
|
2024-06-05 15:53:02 +00:00
|
|
|
, stdenv
|
|
|
|
, alsa-lib
|
2023-05-24 13:37:59 +00:00
|
|
|
, nix-update-script
|
2023-02-02 18:25:31 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
buildGoModule rec {
|
2023-02-02 18:25:31 +00:00
|
|
|
pname = "go-musicfox";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "4.4.1";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-05-24 13:37:59 +00:00
|
|
|
owner = "go-musicfox";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "go-musicfox";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-pIfQ0ufn8W0opm+N6IPFBPWNxNWMOU7FudPtIFop51c=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
deleteVendor = true;
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
vendorHash = "sha256-ey78zeCSEuRgteG5ZRb4uO88E6lwEgqSxKfjJg3NGT4=";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/musicfox.go" ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
2023-10-19 13:55:26 +00:00
|
|
|
"-X github.com/go-musicfox/go-musicfox/internal/types.AppVersion=${version}"
|
2023-02-02 18:25:31 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
flac
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
alsa-lib
|
2023-02-02 18:25:31 +00:00
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Terminal netease cloud music client written in Go";
|
|
|
|
homepage = "https://github.com/anhoder/go-musicfox";
|
|
|
|
license = licenses.mit;
|
|
|
|
mainProgram = "musicfox";
|
2023-04-29 16:46:19 +00:00
|
|
|
maintainers = with maintainers; [ zendo Ruixi-rebirth aleksana ];
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
}
|