nixpkgs/pkgs/games/chessx/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
1.5 KiB
Nix
Raw Normal View History

2023-08-19 02:53:22 +00:00
{ stdenv
, lib
, pkg-config
, zlib
, qtbase
, qtsvg
, qttools
, qtmultimedia
, qmake
2023-08-19 02:53:22 +00:00
, fetchpatch
, fetchurl
2023-08-19 02:53:22 +00:00
, wrapQtAppsHook
}:
stdenv.mkDerivation (finalAttrs: {
pname = "chessx";
2023-08-19 02:53:22 +00:00
version = "1.6.0";
src = fetchurl {
url = "mirror://sourceforge/chessx/chessx-${finalAttrs.version}.tgz";
2023-08-19 02:53:22 +00:00
hash = "sha256-76YOe1WpB+vdEoEKGTHeaWJLpCVE4RoyYu1WLy3Dxhg=";
};
nativeBuildInputs = [
pkg-config
qmake
2023-08-19 02:53:22 +00:00
wrapQtAppsHook
];
buildInputs = [
qtbase
qtmultimedia
qtsvg
qttools
zlib
];
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;
installPhase = ''
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"
runHook postInstall
'';
meta = with lib; {
2023-08-19 02:53:22 +00:00
homepage = "https://chessx.sourceforge.io/";
description = "Browse and analyse chess games";
2023-08-19 02:53:22 +00:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ eclairevoyant luispedro ];
platforms = platforms.linux;
2023-08-19 02:53:22 +00:00
mainProgram = "chessx";
};
})