{
  lib,
  stdenvNoCC,
  fetchzip,
  style ? "mixed",
  baseVersion ? "2.2",
}:
let
  styles = builtins.mapAttrs (_: v: lib.escape [ " " "(" ")" ] v) {
    "bitmap" = "otb - Bm (linux bitmap)";
    "aspect" = "ttf - Ac (aspect-corrected)";
    "mixed" = "ttf - Mx (mixed outline+bitmap)";
    "pixel" = "ttf - Px (pixel outline)";
  };
  selectedStyle = styles.${style};
in
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "oldschool-pc-font-pack";
  version = "${baseVersion}-${style}";
  src = fetchzip {
    name = "oldschool-pc-font-pack-base";
    url = "https://int10h.org/oldschool-pc-fonts/download/oldschool_pc_font_pack_v${baseVersion}_linux.zip";
    hash = "sha256-54U8tZzvivTSOgmGesj9QbIgkSTm9w4quMhsuEc0Xy4=";
    stripRoot = false;
  };

  installPhase = ''
    runHook preInstall
  ''
  + (
    if (style == "bitmap") then
      ''
        install -m644 --target $out/share/fonts/ -D $src/${selectedStyle}/*.otb
      ''
    else
      ''
        install -m644 --target $out/share/fonts/truetype/ -D $src/${selectedStyle}/*.ttf
      ''
  )
  + ''
    runHook postInstall
  '';

})
