nixpkgs-suyu/pkgs/development/tools/jpexs/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

57 lines
1.6 KiB
Nix

{ lib, stdenv, fetchzip, makeWrapper, makeDesktopItem, jdk8 }:
stdenv.mkDerivation rec {
pname = "jpexs";
version = "11.3.0";
src = fetchzip {
url = "${meta.homepage}/releases/download/version${version}/ffdec_${version}.zip";
sha256 = "0d1xmq21vdpn0glwfzr00s62ic8jynmgmgxl0m1834xqf3ma0ihv";
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;";
extraEntries = ''
StartupWMClass=com-jpexs-decompiler-flash-gui-Main
'';
};
meta = with lib; {
description = "Flash SWF decompiler and editor";
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";
license = licenses.gpl3;
platforms = jdk8.meta.platforms;
maintainers = with maintainers; [ samuelgrf ];
};
}