diff options
author | zendo <linzway@qq.com> | 2023-01-30 00:31:33 +0800 |
---|---|---|
committer | zendo <linzway@qq.com> | 2023-01-31 11:17:25 +0800 |
commit | b5158decda218c38b7c3d79747e6fb1586e1c1bd (patch) | |
tree | ef8ffdc5c7067c91ee03f022bf2e82e505f7afa0 /pkgs/applications/audio/go-musicfox | |
parent | 99563190d585896d7ddb43ea448a95574dfa2373 (diff) |
go-musicfox: init at 3.6.1
Diffstat (limited to 'pkgs/applications/audio/go-musicfox')
-rw-r--r-- | pkgs/applications/audio/go-musicfox/default.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/applications/audio/go-musicfox/default.nix b/pkgs/applications/audio/go-musicfox/default.nix new file mode 100644 index 0000000000000..cf5ac3f8c52e7 --- /dev/null +++ b/pkgs/applications/audio/go-musicfox/default.nix @@ -0,0 +1,50 @@ +{ lib +, fetchFromGitHub +, buildGoModule +, clangStdenv +, pkg-config +, alsa-lib +, flac +}: + +# gcc only supports objc on darwin +buildGoModule.override { stdenv = clangStdenv; } rec { + pname = "go-musicfox"; + version = "3.6.1"; + + src = fetchFromGitHub { + owner = "anhoder"; + repo = pname; + rev = "v${version}"; + hash = "sha256-iinEo+HrcNM3gx1iUqe1duRd45PrYgVybRt9NKphwuY="; + }; + + deleteVendor = true; + + vendorHash = "sha256-DbdAEvcspTYMYMvc5IBEUtQAJMW8JZpNi0UA/DvzGFo="; + + subPackages = [ "cmd/musicfox.go" ]; + + ldflags = [ + "-s" + "-w" + "-X go-musicfox/pkg/constants.AppVersion=${version}" + ]; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + alsa-lib + flac + ]; + + meta = with lib; { + description = "Terminal netease cloud music client written in Go"; + homepage = "https://github.com/anhoder/go-musicfox"; + license = licenses.mit; + mainProgram = "musicfox"; + maintainers = with maintainers; [ zendo ]; + }; +} |