anchor.diff:      wrapQtAppsHook
     ];
   
  -  propagatedBuildInputs = with pythonPackages; [
  +  propagatedBuildInputs = with python3Packages; [
       beautifulsoup4
  +    chardet
  +    cloudscraper
       html5lib
       lxml
  +    lz4
  +    nose
       numpy
       opencv4
       pillow
       psutil
  +    pylzma
       pyopenssl
  +    pyside2
  +    pysocks
  +    pythonPackages.mpv
       pyyaml
  -    pylzma
  +    qtpy
       requests
       send2trash
       service-identity
  +    six
       twisted
  -    lz4
  -    xz
  -    pysocks
  -    matplotlib
  -    qtpy
  -    pyside2
  -    mpv
     ];
   
  -  checkInputs = with pythonPackages; [ nose httmock ];
  +  checkInputs = with python3Packages; [ nose mock httmock ];
   
     # most tests are failing, presumably because we are not using test.py
     checkPhase = ''
  
positive.code: { lib
  , fetchFromGitHub
  , xz
  , wrapQtAppsHook
  , miniupnpc_2
  , enableSwftools ? false
  , swftools
  , pythonPackages
  }:
  
  pythonPackages.buildPythonPackage rec {
    pname = "hydrus";
    version = "447";
    format = "other";
  
negative.code: 
    outputs = [ "out" "doc" ];
  
    installPhase = ''
      # Move the hydrus module and related directories
      mkdir -p $out/${python3Packages.python.sitePackages}
      mv {hydrus,static} $out/${python3Packages.python.sitePackages}
      mv help $out/doc/
  
      # install the hydrus binaries
      mkdir -p $out/bin
      install -m0755 server.py $out/bin/hydrus-server
      install -m0755 client.py $out/bin/hydrus-client
    '' + lib.optionalString enableSwftools ''
      mkdir -p $out/${python3Packages.python.sitePackages}/bin
      # swfrender seems to have to be called sfwrender_linux
      # not sure if it can be loaded through PATH, but this is simpler
      # $out/python3Packages.python.sitePackages/bin is correct NOT .../hydrus/bin
      ln -s ${swftools}/bin/swfrender $out/${python3Packages.python.sitePackages}/bin/swfrender_linux
    '';
  
    dontWrapQtApps = true;
    preFixup = ''
      makeWrapperArgs+=("''${qtWrapperArgs[@]}")
      makeWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ ffmpeg miniupnpc_2 ]})
    '';
  
    meta = with lib; {
  