anchor.diff: -{ stdenv, fetchFromGitHub, python2Packages, writeText, writeScript
  +{ stdenv, fetchFromGitHub, python3Packages, writeText, writeScript
   , coreutils, sqlite }:
  +
  +with python3Packages;
   
   let
     dbSql = writeText "create_pykms_db.sql" ''
  
positive.code: 
      mv $siteDir/README.md $out/share/doc/pykms/
  
      ${python2Packages.python.interpreter} -m compileall $siteDir
  
      runHook postInstall
    '';
  
negative.code:     fi
    '');
  
  in buildPythonApplication rec {
    name = "pykms-${version}";
    version = "20171224";
  
    src = fetchFromGitHub {
      owner  = "ThunderEX";
      repo   = "py-kms";
      rev    = "885f67904f002042d7758e38f9c5426461c5cdc7";
      sha256 = "155khy1285f8xkzi6bsqm9vzz043jsjmp039va1qsh675gz3q9ha";
    };
  
    propagatedBuildInputs = [ argparse pytz ];
  
    prePatch = ''
      siteDir=$out/${python.sitePackages}
  
      substituteInPlace kmsBase.py \
        --replace "'KmsDataBase.xml'" "'$siteDir/KmsDataBase.xml'"
  