base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / sc / scenic-view / package.nix
blobe0c79ed08f778004f8edc916eb1bed49420f10ad
1 { lib, stdenv, fetchFromGitHub, openjdk, openjfx, gradle_7, makeDesktopItem, makeWrapper }:
2 let
3   jdk = openjdk.override (lib.optionalAttrs stdenv.hostPlatform.isLinux {
4     enableJavaFX = true;
5     openjfx_jdk = openjfx.override { withWebKit = true; };
6   });
8   pname = "scenic-view";
9   version = "11.0.2";
11   src = fetchFromGitHub {
12     owner = "JonathanGiles";
13     repo = pname;
14     rev = version;
15     sha256 = "1idfh9hxqs4fchr6gvhblhvjqk4mpl4rnpi84vn1l3yb700z7dwy";
16   };
18   gradle = gradle_7;
20   desktopItem = makeDesktopItem {
21     name = pname;
22     desktopName = pname;
23     exec = pname;
24     comment = "JavaFx application to visualize and modify the scenegraph of running JavaFx applications.";
25     mimeTypes = [ "application/java" "application/java-vm" "application/java-archive" ];
26     categories = [ "Development" ];
27   };
29 in stdenv.mkDerivation rec {
30   inherit pname version src;
31   nativeBuildInputs = [ gradle makeWrapper ];
33   mitmCache = gradle.fetchDeps {
34     inherit pname;
35     data = ./deps.json;
36   };
38   __darwinAllowLocalNetworking = true;
40   doCheck = true;
42   installPhase = ''
43     runHook preInstall
45     mkdir -p $out/bin $out/share/${pname}
46     cp build/libs/scenicview.jar $out/share/${pname}/${pname}.jar
47     makeWrapper ${jdk}/bin/java $out/bin/${pname} --add-flags "-jar $out/share/${pname}/${pname}.jar"
49     runHook postInstall
50   '';
52   desktopItems = [ desktopItem ];
54   meta = with lib; {
55     broken = stdenv.hostPlatform.isDarwin;
56     description = "JavaFx application to visualize and modify the scenegraph of running JavaFx applications";
57     mainProgram = "scenic-view";
58     longDescription = ''
59       A JavaFX application designed to make it simple to understand the current state of your application scenegraph
60       and to also easily manipulate properties of the scenegraph without having to keep editing your code.
61       This lets you find bugs and get things pixel perfect without having to do the compile-check-compile dance.
62     '';
63     homepage = "https://github.com/JonathanGiles/scenic-view/";
64     sourceProvenance = with sourceTypes; [
65       fromSource
66       binaryBytecode  # deps
67     ];
68     license = licenses.gpl3Plus;
69     maintainers = with maintainers; [ wirew0rm ];
70     platforms = platforms.all;
71   };