2023-08-19 02:53:22 +00:00
|
|
|
{ stdenv
|
2021-01-25 08:26:54 +00:00
|
|
|
, lib
|
2021-01-17 05:49:22 +00:00
|
|
|
, pkg-config
|
2019-11-24 11:29:35 +00:00
|
|
|
, zlib
|
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
|
|
|
, qttools
|
|
|
|
, qtmultimedia
|
|
|
|
, qmake
|
2023-08-19 02:53:22 +00:00
|
|
|
, fetchpatch
|
2019-11-24 11:29:35 +00:00
|
|
|
, fetchurl
|
2023-08-19 02:53:22 +00:00
|
|
|
, wrapQtAppsHook
|
2018-09-08 12:19:24 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-19 02:53:22 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "chessx";
|
2023-08-19 02:53:22 +00:00
|
|
|
version = "1.6.0";
|
2018-09-08 12:19:24 +00:00
|
|
|
|
2015-12-13 23:51:05 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/chessx/chessx-${version}.tgz";
|
2023-08-19 02:53:22 +00:00
|
|
|
hash = "sha256-76YOe1WpB+vdEoEKGTHeaWJLpCVE4RoyYu1WLy3Dxhg=";
|
2015-12-13 23:51:05 +00:00
|
|
|
};
|
2018-09-08 12:19:24 +00:00
|
|
|
|
2019-11-24 11:29:35 +00:00
|
|
|
nativeBuildInputs = [
|
2021-01-17 05:49:22 +00:00
|
|
|
pkg-config
|
2019-11-24 11:29:35 +00:00
|
|
|
qmake
|
2023-08-19 02:53:22 +00:00
|
|
|
wrapQtAppsHook
|
2019-11-24 11:29:35 +00:00
|
|
|
];
|
|
|
|
|
2015-12-13 23:51:05 +00:00
|
|
|
buildInputs = [
|
2018-09-08 12:19:24 +00:00
|
|
|
qtbase
|
2019-11-24 11:29:35 +00:00
|
|
|
qtmultimedia
|
2018-09-08 12:19:24 +00:00
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
zlib
|
2015-12-13 23:51:05 +00:00
|
|
|
];
|
2018-09-08 12:19:24 +00:00
|
|
|
|
2023-08-19 02:53:22 +00: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 17:12:53 +00:00
|
|
|
|
2015-12-13 23:51:05 +00:00
|
|
|
installPhase = ''
|
2018-09-08 12:19:24 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2023-08-19 02:53:22 +00:00
|
|
|
install -Dm555 release/chessx -t "$out/bin"
|
|
|
|
install -Dm444 unix/chessx.desktop -t "$out/share/applications"
|
2018-09-08 12:19:24 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2015-12-13 23:51:05 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2023-08-19 02:53:22 +00:00
|
|
|
homepage = "https://chessx.sourceforge.io/";
|
2020-10-26 04:08:40 +00:00
|
|
|
description = "Browse and analyse chess games";
|
2023-08-19 02:53:22 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ eclairevoyant luispedro ];
|
2018-09-08 12:19:24 +00:00
|
|
|
platforms = platforms.linux;
|
2023-08-19 02:53:22 +00:00
|
|
|
mainProgram = "chessx";
|
2015-12-13 23:51:05 +00:00
|
|
|
};
|
|
|
|
}
|