{
  lib,
  stdenv,
  fetchFromGitHub,
}:

stdenv.mkDerivation {
  pname = "emu2";
  version = "2021.01-unstable-2021-09-22";

  strictDeps = true;
  __structuredAttrs = true;

  src = fetchFromGitHub {
    owner = "dmsc";
    repo = "emu2";
    rev = "8d01b53f154d6bfc9561a44b9c281b46e00a4e87";
    hash = "sha256-Jafl0Pw2k5RCF9GgpdAWcQ+HBTsiX7dOKSMCWPHQ+2E=";
  };

  makeFlags = [ "PREFIX=$(out)" ];

  meta = {
    homepage = "https://github.com/dmsc/emu2/";
    description = "Simple text-mode x86 + DOS emulator";
    platforms = lib.platforms.linux;
    maintainers = [ ];
    license = lib.licenses.gpl2Only;
    mainProgram = "emu2";
  };
}
