{ pkgs, wine ? pkgs.wine, ... }: let
  wrapped = pkgs.writeShellScriptBin "mspaint" ''
    ${wine}/bin/wine ${./bin}/mspaint.exe
  '';
  desktopItem = pkgs.makeDesktopItem {
    name = "mspaint";
    desktopName = "mspaint";
    type = "Application";
    categories = [ "Graphics" ];
    exec = "${wrapped}/bin/mspaint";
  };
in pkgs.stdenvNoCC.mkDerivation {
  pname = "mspaint";
  version = "0.0.0";
  src = wrapped;

  nativeBuildInputs = [
    pkgs.copyDesktopItems
  ];

  desktopItems = [ desktopItem ];
}
