From 64387acfe4e6742d9ae6f559b6e83ce324ccb547 Mon Sep 17 00:00:00 2001 From: Mirza Arnaut Date: Sat, 11 Jul 2026 15:14:56 +0200 Subject: [PATCH] cliamp: fix darwin build Darwin wasn't building due to the length of the socket paths being allowed (104 bytes). This makes a new TMPDIR which is shorter and the build succeeds now. Also, I added the platforms tag which reflects the two platforms I have tested cliamp for. Maybe changing it to unix would also be okay, but I haven't tested it. --- pkgs/by-name/cl/cliamp/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/cl/cliamp/package.nix b/pkgs/by-name/cl/cliamp/package.nix index 0c28952a16a3..fbd4c958f9e2 100644 --- a/pkgs/by-name/cl/cliamp/package.nix +++ b/pkgs/by-name/cl/cliamp/package.nix @@ -41,6 +41,11 @@ buildGoModule (finalAttrs: { alsa-lib ]; + # macOS limits Unix socket paths to 104 bytes; use a shorter TMPDIR. + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' + export TMPDIR="$(mktemp -d /tmp/cliamp-XXXXXX)" + ''; + postInstall = '' wrapProgram $out/bin/cliamp \ --prefix PATH : ${ @@ -60,6 +65,7 @@ buildGoModule (finalAttrs: { description = "Terminal Winamp - a retro terminal music player inspired by Winamp 2.x"; homepage = "https://github.com/bjarneo/cliamp"; license = lib.licenses.mit; + platforms = with lib.platforms; darwin ++ linux; maintainers = with lib.maintainers; [ supermarin ]; mainProgram = "cliamp"; };