Based on https://discourse.nixos.org/t/how-to-build-python-package-for-use-in-non-nix-environments/21587.