anchor.diff:    inherit pname version src;
   
     buildPhase = ''
  +    VERSION=${version}
  +    SEMVER_STR=${version}
  +
       mvn -Plinux package --offline -Dmaven.test.skip=true -Dmaven.repo.local=$(cp -dpR ${deps}/.m2 ./ && chmod +w -R .m2 && pwd)/.m2
     '';
   
  +
  +  # This is based on the instructins in https://github.com/cryptomator/cryptomator/blob/develop/dist/linux/appimage/build.sh
     installPhase = ''
       mkdir -p $out/bin/ $out/share/cryptomator/libs/ $out/share/cryptomator/mods/
   
  
positive.code: 
      outputHashAlgo = "sha256";
      outputHashMode = "recursive";
      outputHash = "sha256-XFqXjNjPN2vwA3jay7TS79S4FHksjjrODdD/p4oTvpg=";
  
      doCheck = false;
    };
  
negative.code: 
      # install desktop entry and icons
      cp -r ${src}/dist/linux/appimage/resources/AppDir/usr/* $out/
      # The directory is read only when copied, enable read to install additional files
      chmod +w -R $out/
      cp ${src}/dist/linux/common/org.cryptomator.Cryptomator256.png $out/share/icons/hicolor/256x256/apps/org.cryptomator.Cryptomator.png
      cp ${src}/dist/linux/common/org.cryptomator.Cryptomator512.png $out/share/icons/hicolor/512x512/apps/org.cryptomator.Cryptomator.png
      cp ${src}/dist/linux/common/org.cryptomator.Cryptomator.svg $out/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg
      cp ${src}/dist/linux/common/org.cryptomator.Cryptomator.desktop $out/share/applications/org.cryptomator.Cryptomator.desktop
      cp ${src}/dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml $out/share/metainfo/org.cryptomator.Cryptomator.metainfo.xml
      cp ${src}/dist/linux/common/application-vnd.cryptomator.vault.xml $out/share/mime/packages/application-vnd.cryptomator.vault.xml
    '';
  
    nativeBuildInputs = [ autoPatchelfHook maven makeWrapper wrapGAppsHook jdk ];
  