Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / games / cgoban / default.nix
blob3d202985f1b0193cf4bcad6679bec3c377ce3fb6
1 { lib
2 , stdenv
3 , writers
4 , adoptopenjdk-jre-bin
5 , fetchurl
6 , makeWrapper
7 }:
8 stdenv.mkDerivation rec {
9   pname = "cgoban";
10   version = "3.5.23";
12   nativeBuildInputs = [ adoptopenjdk-jre-bin makeWrapper ];
14   src = fetchurl {
15     url = "https://web.archive.org/web/20210116034119/https://files.gokgs.com/javaBin/cgoban.jar";
16     sha256 = "0srw1hqr9prgr9dagfbh2j6p9ivaj40kdpyhs6zjkg7lhnnrrrcv";
17   };
19   dontConfigure = true;
20   dontUnpack = true;
21   dontBuild = true;
22   dontPatchELF = true;
24   installPhase = ''
25     runHook preInstall
26     install -D $src $out/lib/cgoban.jar
27     makeWrapper ${adoptopenjdk-jre-bin}/bin/java $out/bin/cgoban --add-flags "-jar $out/lib/cgoban.jar"
28     runHook postInstall
29   '';
31   meta = with lib; {
32     description = "Client for the KGS Go Server";
33     homepage = "https://www.gokgs.com/";
34     sourceProvenance = with sourceTypes; [ binaryBytecode ];
35     license = licenses.free;
36     maintainers = with maintainers; [ savannidgerinel ];
37     platforms = adoptopenjdk-jre-bin.meta.platforms;
38   };