Trouble with nix-cargo-integration

I needed to suspend project for a few months and when I get back my config no longer worked. I tried to update it but it doesn’t do what I want it to do:

  inputs = {                                                                                                                                                                                                         
    nixCargoIntegration.url = "github:yusdacra/nix-cargo-integration";                                                                                                                                               
  outputs = inputs: inputs.nixCargoIntegration.lib.makeOutputs {                                                                                                                                                     
    root = ./.;                                                                                                                                                                                                      
    config = common: {                                                                                                                                                                                               
      shell = {                                                                                                                                                                                                      
        packages = [common.pkgs.pkg-config common.pkgs.alsa-lib];                                                                                                                                                    
    pkgConfig = common: {                                                                                                                                                                                            
      "alsa-sys" = {                                                                                                                                                                                                 
        depsOverride = {                                                                                                                                                                                             
          deps-override = {                                                                                                                                                                                          
            buildInputs = [common.pkgs.pkg-config common.pkgs.alsa-lib];                                                                                                                                             

And dev-shell:

% pkg-config --libs --cflags alsa
Package alsa was not found in the pkg-config search path.
Perhaps you should add the directory containing `alsa.pc'
to the PKG_CONFIG_PATH environment variable
No package 'alsa' found
% nix build .#creepers
warning: Git tree '$HOME/Projects/creepers' is dirty
error: builder for '/nix/store/masjp3jjk0sy2s85m6d4sj535aaj5489-creepers-deps-0.1.0.drv' failed with exit code 101;
       last 10 log lines:
       >   or `pkg install pkg-config` depending on your distribution.
       >   If you've already installed it, ensure the pkg-config command is one of the
       >   directories in the PATH environment variable.
       >   If you did not expect this build to link to a pre-installed system library,
       >   then check documentation of the alsa-sys crate for an option to
       >   build the library from source, or disable features or dependencies
       >   that require pkg-config.', /build/nix-vendor/alsa-sys-0.3.1/
       >   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
       For full logs, run 'nix log /nix/store/masjp3jjk0sy2s85m6d4sj535aaj5489-creepers-deps-0.1.0.drv'.
error: 1 dependencies of derivation '/nix/store/64sxcb35ww295kjrcw7hp45gzwnqxw5h-creepers-0.1.0.drv' failed to build

Any hints on how to do it?

I’m sure you gave up on this months ago, but for future reference, I think the problem is just that you need to place pkg-config in nativeBuildInputs rather than buildInputs, because it will be natively executed on the build host rather than used as a source dependency to be compiled for the target.

Presumably the pkg-config package stopped placing its binary in whatever output the buildInputs actually pull their files from.

I’ve run into this exact same problem building alsa-sys, and spotted this after looking at your question. Moving pkg-config makes the crate build fine for me.