@@ -1,30 +1,41 @@
1−{ stdenv, pkgconfig, zlib, qtbase, qtsvg, qttools, qtmultimedia, qmake, fetchurl }:
1+{ stdenv, pkgconfig, zlib, qtbase, qtsvg, qttools, qtmultimedia, qmake, fetchurl, makeWrapper
2stdenv.mkDerivation rec {
5stdenv.mkDerivation rec {
3 name = "chessx-${version}";
6 name = "chessx-${version}";
4 version = "1.4.6";
7 version = "1.4.6";
5 src = fetchurl {
9 src = fetchurl {
6 url = "mirror://sourceforge/chessx/chessx-${version}.tgz";
10 url = "mirror://sourceforge/chessx/chessx-${version}.tgz";
7 sha256 = "1vb838byzmnyglm9mq3khh3kddb9g4g111cybxjzalxxlc81k5dd";
11 sha256 = "1vb838byzmnyglm9mq3khh3kddb9g4g111cybxjzalxxlc81k5dd";
9 buildInputs = [
14 buildInputs = [
13− qtmultimedia
18+ qtmultimedia
16− nativeBuildInputs = [ pkgconfig qmake ];
22+ nativeBuildInputs = [ pkgconfig qmake makeWrapper ];
18 # RCC: Error in 'resources.qrc': Cannot find file 'i18n/chessx_da.qm'
24 # RCC: Error in 'resources.qrc': Cannot find file 'i18n/chessx_da.qm'
19 enableParallelBuilding = false;
25 enableParallelBuilding = false;
21 installPhase = ''
27 installPhase = ''
22− runHook preInstall
28+ runHook preInstall
23− mkdir -p "$out/bin"
30+ mkdir -p "$out/bin"
24− mkdir -p "$out/share/applications"
31+ mkdir -p "$out/share/applications"
25− cp -pr release/chessx "$out/bin"
32+ cp -pr release/chessx "$out/bin"
26− cp -pr unix/chessx.desktop "$out/share/applications"
33+ cp -pr unix/chessx.desktop "$out/share/applications"
35+ wrapProgram $out/bin/chessx \
36+ --prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins
27− runHook postInstall
38+ runHook postInstall
30 meta = with stdenv.lib; {
41 meta = with stdenv.lib; {
@@ -32,5 +43,6 @@ stdenv.mkDerivation rec {
32 description = "ChessX allows you to browse and analyse chess games";
43 description = "ChessX allows you to browse and analyse chess games";
33 license = licenses.gpl2;
44 license = licenses.gpl2;
34 maintainers = [maintainers.luispedro];
45 maintainers = [maintainers.luispedro];
46+ platforms = platforms.linux;