Skip to content

nix/default.nix out of sync with libcava.wrap - cava build broken #4726

@xav-ie

Description

@xav-ie

The nix flake build fails to include cava support because nix/default.nix is out of sync with subprojects/libcava.wrap.

> Run-time dependency libcava found: NO (tried pkgconfig and cmake)
> Looking for a fallback subproject for the dependency libcava
> ERROR: Subproject libcava is buildable: NO
> Message: cava is not found. Building waybar without cava

Root Cause

Two commits updated cava-related files but left them inconsistent:

  1. Commit 97682a13 (Oct 19, 2025) - "nix: bump cava"

    • Changed nix to use commit 23efcced...
    • Copies to subprojects/cava
  2. Commit 13519ca5 (Nov 26, 2025) - "cava. nonsafe thread.= & cava bump"

    • Renamed cava.wraplibcava.wrap
    • Changed expected directory to cava-0.10.7-beta
    • Changed source to v0.10.7-beta tag
    • Did not update nix/default.nix

Current state

nix/default.nix:

libcava = {
  src = pkgs.fetchFromGitHub {
    owner = "LukashonakV";
    repo = "cava";
    rev = "23efcced43b5a395747b18a2e5f2171fc0925d18";  # Old commit from Oct 12
    hash = "sha256-CNspaoK5KuME0GfaNijpC24BfALngzNi04/VNwPqMvo=";
  };
};
# ...
postUnpack = ''
  cp -R ... ${libcava.src} subprojects/cava  # Wrong directory name
'';

subprojects/libcava.wrap:

[wrap-file]
directory = cava-0.10.7-beta  # Expects this directory name
source_url = https://github.com/LukashonakV/cava/archive/v0.10.7-beta.tar.gz

Suggested Fix

Update nix/default.nix to match libcava.wrap:

libcava = {
  src = pkgs.fetchFromGitHub {
    owner = "LukashonakV";
    repo = "cava";
    # NOTE: Needs to match the libcava.wrap
    rev = "v0.10.7-beta";
    hash = "sha256-IX1B375gTwVDRjpRfwKGuzTAZOV2pgDWzUd4bW2cTDU=";
  };
};
# ...
postUnpack = ''
  pushd "$sourceRoot"
  cp -R --no-preserve=mode,ownership ${libcava.src} subprojects/cava-0.10.7-beta
  patchShebangs .
  popd
'';

Steps to Reproduce

git clone https://github.com/Alexays/Waybar
cd Waybar
nix build .#waybar

Build succeeds but waybar is built without cava support.

System Info

  • NixOS (Linux 6.18.2)
  • nix build from flake

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions