1 { lib, stdenv, fetchzip, makeWrapper, makeDesktopItem, jdk8 }:
3 stdenv.mkDerivation rec {
8 url = "https://github.com/jindrapetrik/jpexs-decompiler/releases/download/version${version}/ffdec_${version}.zip";
9 sha256 = "sha256-aaEL3xJZkFw78zo3IyauWJM9kOo0rJTUSKmWsv9xQZ8=";
15 nativeBuildInputs = [ makeWrapper ];
21 mkdir -p $out/share/{ffdec,icons/hicolor/512x512/apps}
23 cp ffdec.jar $out/share/ffdec
24 cp -r lib $out/share/ffdec
25 cp icon.png $out/share/icons/hicolor/512x512/apps/ffdec.png
26 cp -r ${desktopItem}/share/applications $out/share
28 makeWrapper ${jdk8}/bin/java $out/bin/ffdec \
29 --add-flags "-jar $out/share/ffdec/ffdec.jar"
32 desktopItem = makeDesktopItem rec {
36 desktopName = "JPEXS Free Flash Decompiler";
37 genericName = "Flash Decompiler";
38 comment = meta.description;
39 categories = [ "Development" "Java" ];
40 startupWMClass = "com-jpexs-decompiler-flash-gui-Main";
44 description = "Flash SWF decompiler and editor";
45 mainProgram = "ffdec";
47 Open-source Flash SWF decompiler and editor. Extract resources,
48 convert SWF to FLA, edit ActionScript, replace images, sounds,
51 homepage = "https://github.com/jindrapetrik/jpexs-decompiler";
52 sourceProvenance = with sourceTypes; [ binaryBytecode ];
53 license = licenses.gpl3;
54 platforms = jdk8.meta.platforms;