python312Packages.types-aiobotocore: 2.15.2 -> 2.15.2.post3 (#361801)
[NixPkgs.git] / pkgs / by-name / qu / quake-injector / package.nix
blobc503847e8929f994f3688db1fe02185f82c88720
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   gradle,
6   jre,
7   makeWrapper,
8   jdk,
9   git,
10   makeDesktopItem,
11   copyDesktopItems,
13 stdenv.mkDerivation (finalAttrs: {
14   pname = "quake-injector";
15   version = "06";
17   src = fetchFromGitHub {
18     owner = "hrehfeld";
19     repo = "QuakeInjector";
20     rev = "refs/tags/alpha${finalAttrs.version}";
21     hash = "sha256-bbvLp5/Grg+mXBuV5aJCMOSjFp1+ukZS+AivcbhBxHU=";
22   };
24   nativeBuildInputs = [
25     gradle
26     makeWrapper
27     git
28     copyDesktopItems
29   ];
31   mitmCache = gradle.fetchDeps {
32     inherit (finalAttrs) pname;
33     data = ./deps.json;
34   };
36   __darwinAllowLocalNetworking = true;
38   doCheck = true;
40   installPhase = ''
41     runHook preInstall
43     mkdir -p $out/{bin,share/quake-injector}
44     cp build/libs/QuakeInjector.jar $out/share/quake-injector
46     mkdir -p $out/share/icons/hicolor/256x256/apps
47     cp src/main/resources/Inject2_256.png $out/share/icons/hicolor/256x256/apps/quake-injector.png
49     makeWrapper ${jre}/bin/java $out/bin/quake-injector \
50       --add-flags "-jar $out/share/quake-injector/QuakeInjector.jar"
52     runHook postInstall
53   '';
55   desktopItems = [
56     (makeDesktopItem {
57       name = "quake-injector";
58       exec = finalAttrs.meta.mainProgram;
59       icon = "quake-injector";
60       comment = finalAttrs.meta.description;
61       desktopName = "Quake Injector";
62       categories = [ "Game" ];
63     })
64   ];
66   meta = {
67     description = "Download, install and play quake singleplayer maps from the quaddicted.com archive";
68     homepage = "https://github.com/hrehfeld/QuakeInjector";
69     changelog = "https://github.com/hrehfeld/QuakeInjector/releases";
70     license = lib.licenses.gpl3Plus;
71     maintainers = with lib.maintainers; [ theobori ];
72     mainProgram = "quake-injector";
73     platforms = jdk.meta.platforms;
74     sourceProvenance = with lib.sourceTypes; [
75       fromSource
76       binaryBytecode # mitm cache
77     ];
78   };