Python env doesn't include package without dist-info

I’m trying to make a nix environment that has pywikibots’s scripts directory, since it seems the derivation from nixpkgs doesn’t use the recursive fetching and thus doesn’t get i18n files.

I’ve made a derivation like so:

{
  lib,
  fetchgit,
  python3,
  stdenv,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "pywikibot-scripts";
  version = "f1b4b4d0cfbc199c36fb72570425328daa93b067";

  src = fetchgit {
    url = "https://gerrit.wikimedia.org/r/pywikibot/core";
    rev = finalAttrs.version;
    fetchSubmodules = true;
    hash = "sha256-L/Yz9yidpTV7WCqHs2L6lFw/CpQyZ1UNd+NpMLJT0Hs=";
  };

  wbsitePackages = "${placeholder "out"}/${python3.sitePackages}";
  wbdistInfo = "${finalAttrs.wbsitePackages}/scripts-${finalAttrs.version}.dist-info";
  installPhase = ''
    mkdir -p ${finalAttrs.wbsitePackages} ${finalAttrs.wbdistInfo}
    cp -r $src/scripts/ ${finalAttrs.wbsitePackages}/
    printf "Metadata-Version: 2.4\nName: scripts\nVersion: ${finalAttrs.version}\n" >${finalAttrs.wbdistInfo}/METADATA
    printf "Wheel-Version: 1.0\n" >${finalAttrs.wbdistInfo}/WHEEL
    touch ${finalAttrs.wbdistInfo}/RECORD
  '';
})

however, when i build it inside a python environment like so:

{ mkShellNoCC
, python3
, pywikibot-scripts
}:

python3.withPackages (p: [
    p.pywikibot
    pywikibot-scripts
])

it doesn’t appear in lib/python3.*/site-packages/scripts

i fixed it by making it a python package and using the pythonBuilder thingy