2023-08-19 04:53:22 +02:00
|
|
|
{ stdenv
|
2021-01-25 09:26:54 +01:00
|
|
|
, lib
|
2021-01-17 06:49:22 +01:00
|
|
|
, pkg-config
|
2019-11-24 12:29:35 +01:00
|
|
|
, zlib
|
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
|
|
|
, qttools
|
|
|
|
, qtmultimedia
|
|
|
|
, qmake
|
2023-08-19 04:53:22 +02:00
|
|
|
, fetchpatch
|
2019-11-24 12:29:35 +01:00
|
|
|
, fetchurl
|
2023-08-19 04:53:22 +02:00
|
|
|
, wrapQtAppsHook
|
2018-09-08 14:19:24 +02:00
|
|
|
}:
|
|
|
|
|
2023-08-19 04:53:22 +02:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "chessx";
|
2023-08-19 04:53:22 +02:00
|
|
|
version = "1.6.0";
|
2018-09-08 14:19:24 +02:00
|
|
|
|
2015-12-14 00:51:05 +01:00
|
|
|
src = fetchurl {
|
2023-08-19 04:53:22 +02:00
|
|
|
url = "mirror://sourceforge/chessx/chessx-${finalAttrs.version}.tgz";
|
2023-08-19 04:53:22 +02:00
|
|
|
hash = "sha256-76YOe1WpB+vdEoEKGTHeaWJLpCVE4RoyYu1WLy3Dxhg=";
|
2015-12-14 00:51:05 +01:00
|
|
|
};
|
2018-09-08 14:19:24 +02:00
|
|
|
|
2019-11-24 12:29:35 +01:00
|
|
|
nativeBuildInputs = [
|
2021-01-17 06:49:22 +01:00
|
|
|
pkg-config
|
2019-11-24 12:29:35 +01:00
|
|
|
qmake
|
2023-08-19 04:53:22 +02:00
|
|
|
wrapQtAppsHook
|
2019-11-24 12:29:35 +01:00
|
|
|
];
|
|
|
|
|
2015-12-14 00:51:05 +01:00
|
|
|
buildInputs = [
|
2018-09-08 14:19:24 +02:00
|
|
|
qtbase
|
2019-11-24 12:29:35 +01:00
|
|
|
qtmultimedia
|
2018-09-08 14:19:24 +02:00
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
zlib
|
2015-12-14 00:51:05 +01:00
|
|
|
];
|
2018-09-08 14:19:24 +02:00
|
|
|
|
2023-08-19 04:53:22 +02:00
|
|
|
patches =
|
|
|
|
# needed to backport patches to successfully build, due to broken release
|
|
|
|
let
|
|
|
|
repo = "https://github.com/Isarhamster/chessx/";
|
|
|
|
in
|
|
|
|
[
|
|
|
|
(fetchpatch {
|
|
|
|
url = "${repo}/commit/9797d46aa28804282bd58ce139b22492ab6881e6.diff";
|
|
|
|
hash = "sha256-RnIf6bixvAvyp1CKuri5LhgYFqhDNiAVYWUmSUDMgVw=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "${repo}/commit/4fab4d2f649d1cae2b54464c4e28337d1f20c214.diff";
|
|
|
|
hash = "sha256-EJVHricN+6uabKLfn77t8c7JjO7tMmZGsj7ZyQUGcXA=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2016-12-30 18:12:53 +01:00
|
|
|
|
2015-12-14 00:51:05 +01:00
|
|
|
installPhase = ''
|
2018-09-08 14:19:24 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
2023-08-19 04:53:22 +02:00
|
|
|
install -Dm555 release/chessx -t "$out/bin"
|
|
|
|
install -Dm444 unix/chessx.desktop -t "$out/share/applications"
|
2018-09-08 14:19:24 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
2015-12-14 00:51:05 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2023-08-19 04:53:22 +02:00
|
|
|
homepage = "https://chessx.sourceforge.io/";
|
2020-10-26 05:08:40 +01:00
|
|
|
description = "Browse and analyse chess games";
|
2023-08-19 04:53:22 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ eclairevoyant luispedro ];
|
2018-09-08 14:19:24 +02:00
|
|
|
platforms = platforms.linux;
|
2023-08-19 04:53:22 +02:00
|
|
|
mainProgram = "chessx";
|
2015-12-14 00:51:05 +01:00
|
|
|
};
|
2023-08-19 04:53:22 +02:00
|
|
|
})
|