traefik: add djds as maintainer (#377217)
[NixPkgs.git] / pkgs / by-name / da / dayon / package.nix
blobe53120b7d1607476ec03037ee628e44360fe6d86
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , ant
5 , jdk
6 , jre
7 , makeWrapper
8 , copyDesktopItems
9 , stripJavaArchivesHook
12 stdenv.mkDerivation (finalAttrs: {
13   pname = "dayon";
14   version = "15.0.2";
16   src = fetchFromGitHub {
17     owner = "RetGal";
18     repo = "dayon";
19     rev = "v${finalAttrs.version}";
20     hash = "sha256-5gpST5c3UGutrGuysBEHWqbj9O5+XagA6fTZ7D/R7Oo=";
21   };
23   nativeBuildInputs = [
24     ant
25     jdk
26     makeWrapper
27     copyDesktopItems
28     stripJavaArchivesHook
29   ];
31   buildPhase = ''
32     runHook preBuild
33     ant
34     runHook postBuild
35   '';
37   installPhase = ''
38     runHook preInstall
40     install -Dm644 build/dayon.jar $out/share/dayon/dayon.jar
41     # jre is in PATH because dayon needs keytool to generate certificates
42     makeWrapper ${lib.getExe jre} $out/bin/dayon \
43       --prefix PATH : "${lib.makeBinPath [ jre ]}" \
44       --add-flags "-jar $out/share/dayon/dayon.jar"
45     makeWrapper ${lib.getExe jre} $out/bin/dayon_assisted \
46       --prefix PATH : "${lib.makeBinPath [ jre ]}" \
47       --add-flags "-cp $out/share/dayon/dayon.jar mpo.dayon.assisted.AssistedRunner"
48     makeWrapper ${lib.getExe jre} $out/bin/dayon_assistant \
49       --prefix PATH : "${lib.makeBinPath [ jre ]}" \
50       --add-flags "-cp $out/share/dayon/dayon.jar mpo.dayon.assistant.AssistantRunner"
51     install -Dm644 resources/dayon.png $out/share/icons/hicolor/128x128/apps/dayon.png
53     runHook postInstall
54   '';
56   desktopItems = [
57     "debian/dayon_assisted.desktop"
58     "debian/dayon_assistant.desktop"
59   ];
61   meta = {
62     description = "Easy to use, cross-platform remote desktop assistance solution";
63     homepage = "https://retgal.github.io/Dayon/index.html";
64     license = lib.licenses.gpl3Plus; # https://github.com/RetGal/Dayon/issues/59
65     mainProgram = "dayon";
66     maintainers = with lib.maintainers; [ fgaz ];
67     platforms = lib.platforms.all;
68   };