Build inputs not available in configure step

{
  stdenv,

  fetchFromGitHub,
  autoreconfHook,
  pkg-config,

  libusb1,
  gtk4,
  libjack2,
  libsamplerate,
  libsndfile,
  json-glib,
}:
stdenv.mkDerivation (finalAttrs: {
  src = fetchFromGitHub {
    owner = "dagargo";
    repo = "overwitch";
    rev = "b8f1319daaae65c4badeeb2696d01df2fd5df815";
    hash = "sha256-EYT5m4N9kzeYaOcm1furGGxw1k+Bw+m+FvONVZN9ohk=";
  };

  pname = "overwitch";
  version = "xx-unstable3";

  nativeBuildInputs = [
    autoreconfHook
    pkg-config
  ];

  buildInputs = [
    libusb1
    gtk4
    libjack2
    libsamplerate
    libsndfile
    json-glib
  ];

  installFlags = [
    "DESTDIR=$(out)"
  ];

})

Builds when called via call-package. I have “modernized”(e.g. Packaging Resonarium vst: hash mismatch - #4 by drupol) your derivation in a couple of places (The finalAttrs-construct, replaces your use of rec, but since it was not actually used before it serves no purpose). Looks like you were just missing pkg-config.

2 Likes