Pyocd doesn't work when using home-manager

pyocd works fine when installed through nix-shell:

$ nix-shell -p pyocd --run "pyocd --version"
0.34.3

However, when installed through home-manager, it fails:

$ pyocd --version
[…]
pkg_resources.DistributionNotFound: The 'cffi' distribution was not found and is required by cmsis-pack-manager

In both cases I am using the nixpkgs-unstable channel. Any idea of what happens?