nixpkgs/pkgs/by-name/jp/jpexs/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

58 lines
1.6 KiB
Nix

{ lib, stdenv, fetchzip, makeWrapper, makeDesktopItem, jdk8 }:
stdenv.mkDerivation rec {
pname = "jpexs";
version = "20.1.0";
src = fetchzip {
url = "https://github.com/jindrapetrik/jpexs-decompiler/releases/download/version${version}/ffdec_${version}.zip";
hash = "sha256-ytGtylhyNSdKfuPclZRJasOb/cskW65hMd4NM/q+/Ko=";
stripRoot = false;
};
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/share/{ffdec,icons/hicolor/512x512/apps}
cp ffdec.jar $out/share/ffdec
cp -r lib $out/share/ffdec
cp icon.png $out/share/icons/hicolor/512x512/apps/ffdec.png
cp -r ${desktopItem}/share/applications $out/share
makeWrapper ${jdk8}/bin/java $out/bin/ffdec \
--add-flags "-jar $out/share/ffdec/ffdec.jar"
'';
desktopItem = makeDesktopItem rec {
name = "ffdec";
exec = name;
icon = name;
desktopName = "JPEXS Free Flash Decompiler";
genericName = "Flash Decompiler";
comment = meta.description;
categories = [ "Development" "Java" ];
startupWMClass = "com-jpexs-decompiler-flash-gui-Main";
};
meta = with lib; {
description = "Flash SWF decompiler and editor";
mainProgram = "ffdec";
longDescription = ''
Open-source Flash SWF decompiler and editor. Extract resources,
convert SWF to FLA, edit ActionScript, replace images, sounds,
texts or fonts.
'';
homepage = "https://github.com/jindrapetrik/jpexs-decompiler";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.gpl3;
platforms = jdk8.meta.platforms;
maintainers = [ ];
};
}