2023-01-29 16:31:33 +00:00
|
|
|
{ lib
|
2023-10-12 07:52:29 +00:00
|
|
|
, buildGo121Module
|
2023-04-29 00:44:10 +00:00
|
|
|
, fetchFromGitHub
|
2023-01-29 16:31:33 +00:00
|
|
|
, pkg-config
|
|
|
|
, alsa-lib
|
|
|
|
, flac
|
2023-05-04 09:49:48 +00:00
|
|
|
, nix-update-script
|
2023-01-29 16:31:33 +00:00
|
|
|
}:
|
|
|
|
|
2023-10-12 07:52:29 +00:00
|
|
|
buildGo121Module rec {
|
2023-01-29 16:31:33 +00:00
|
|
|
pname = "go-musicfox";
|
2023-10-12 07:52:29 +00:00
|
|
|
version = "4.2.1";
|
2023-01-29 16:31:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-05-04 00:33:35 +00:00
|
|
|
owner = "go-musicfox";
|
2023-01-29 16:31:33 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-10-12 07:52:29 +00:00
|
|
|
hash = "sha256-yl7PirSt4zEy8ZoDGq3dn5TjJtbJeAgXgbynw/D0d38=";
|
2023-01-29 16:31:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
deleteVendor = true;
|
|
|
|
|
2023-10-12 07:52:29 +00:00
|
|
|
vendorHash = "sha256-ILO4v4ii1l9JokXG7R3vuN7i5hDi/hLHTFiClA2vdf0=";
|
2023-01-29 16:31:33 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/musicfox.go" ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
2023-10-12 07:52:29 +00:00
|
|
|
"-X github.com/go-musicfox/go-musicfox/internal/types.AppVersion=${version}"
|
2023-01-29 16:31:33 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
flac
|
|
|
|
];
|
|
|
|
|
2023-05-04 09:49:48 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2023-01-29 16:31:33 +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 00:44:10 +00:00
|
|
|
maintainers = with maintainers; [ zendo Ruixi-rebirth aleksana ];
|
2023-01-29 16:31:33 +00:00
|
|
|
};
|
|
|
|
}
|