home-assistant-custom-components.homematicip_local: 1.73.0 -> 1.74.0 (#364289)
[NixPkgs.git] / pkgs / games / chessx / default.nix
blobe76cccc6853285baaa5caee325082ed039a61f61
2   stdenv,
3   lib,
4   pkg-config,
5   zlib,
6   qtbase,
7   qtsvg,
8   qttools,
9   qtmultimedia,
10   qmake,
11   fetchpatch,
12   fetchurl,
13   wrapQtAppsHook,
16 stdenv.mkDerivation (finalAttrs: {
17   pname = "chessx";
18   version = "1.6.0";
20   src = fetchurl {
21     url = "mirror://sourceforge/chessx/chessx-${finalAttrs.version}.tgz";
22     hash = "sha256-76YOe1WpB+vdEoEKGTHeaWJLpCVE4RoyYu1WLy3Dxhg=";
23   };
25   nativeBuildInputs = [
26     pkg-config
27     qmake
28     wrapQtAppsHook
29   ];
31   buildInputs = [
32     qtbase
33     qtmultimedia
34     qtsvg
35     qttools
36     zlib
37   ];
39   patches =
40     # needed to backport patches to successfully build, due to broken release
41     let
42       repo = "https://github.com/Isarhamster/chessx/";
43     in
44     [
45       (fetchpatch {
46         url = "${repo}/commit/9797d46aa28804282bd58ce139b22492ab6881e6.diff";
47         hash = "sha256-RnIf6bixvAvyp1CKuri5LhgYFqhDNiAVYWUmSUDMgVw=";
48       })
49       (fetchpatch {
50         url = "${repo}/commit/4fab4d2f649d1cae2b54464c4e28337d1f20c214.diff";
51         hash = "sha256-EJVHricN+6uabKLfn77t8c7JjO7tMmZGsj7ZyQUGcXA=";
52       })
53     ];
55   enableParallelBuilding = true;
57   installPhase = ''
58     runHook preInstall
60     install -Dm555 release/chessx -t "$out/bin"
61     install -Dm444 unix/chessx.desktop -t "$out/share/applications"
63     runHook postInstall
64   '';
66   meta = with lib; {
67     homepage = "https://chessx.sourceforge.io/";
68     description = "Browse and analyse chess games";
69     license = licenses.gpl2Plus;
70     maintainers = with maintainers; [ luispedro ];
71     platforms = platforms.linux;
72     mainProgram = "chessx";
73   };