Autotools works via nix-shell but not via home-manager

I’m on NixOS 23.11.5408.8ac30a39abc5 (Tapir)

I’m trying to build GitHub - kanoi/cgminer: ASIC/FPGA miner in c for bitcoin, which is an autotools-based project.

Doing the following works:

# nix-shell -p autoconf-archive libtool autoconf automake autogen m4 pkg-config
$ ./autogen.sh

I want to make this permanent on my system, so I added the following autotools.nix to my home-manager setup:

{ config, pkgs, ... }: {
  home.packages = with pkgs; [
    automake
    autogen
    autoconf
    autoconf-archive
    libtool
    pkg-config
    m4
  ];
}

but when I try to run autogen.sh, I get the following:

./autogen.sh
configure.ac:40: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:40: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
configure.ac:40: the top level
configure.ac:52: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:52: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
configure.ac:52: the top level
configure.ac:12: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: error: /nix/store/awlzx1g2fcq3n1ndwqrw0vc283mis9qy-autoconf-2.71/bin/autoconf failed with exit status: 1

googling for this error message renders suggestions to install libtool, pkg-config, autogen-archive, all of which I already have installed via home-manager.

What am I doing wrong?

ok this seems this explains it:

https://nixos.wiki/wiki/FAQ/I_installed_a_library_but_my_compiler_is_not_finding_it._Why%3F

that is expected behavior, and I should not be adding these to my home-manager setup.