2017-01-21 13:26:30 +01:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, qtbase, qtsvg, qtserialport, qtwebkit, qtmultimedia, qttools, qtconnectivity
|
2018-09-26 22:18:30 +02:00
|
|
|
, yacc, flex, zlib, qmake, makeDesktopItem, makeWrapper
|
2017-01-21 13:26:30 +01:00
|
|
|
}:
|
2018-09-26 22:18:30 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "goldencheetah";
|
|
|
|
exec = "GoldenCheetah";
|
|
|
|
icon = "goldencheetah";
|
|
|
|
desktopName = "GoldenCheetah";
|
|
|
|
genericName = "GoldenCheetah";
|
|
|
|
comment = "Performance software for cyclists, runners and triathletes";
|
|
|
|
categories = "Application;Utility;";
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
2016-04-17 11:32:02 +02:00
|
|
|
name = "golden-cheetah-${version}";
|
2017-01-21 13:26:30 +01:00
|
|
|
version = "3.4";
|
2016-04-17 11:32:02 +02:00
|
|
|
src = fetchurl {
|
2016-04-24 15:32:05 +02:00
|
|
|
name = "${name}.tar.gz";
|
|
|
|
url = "https://github.com/GoldenCheetah/GoldenCheetah/archive/V${version}.tar.gz";
|
2017-01-21 13:26:30 +01:00
|
|
|
sha256 = "0fiz2pj155cd357kph50lc6rjyzwp045glfv4y68qls9j7m9ayaf";
|
2016-04-17 11:32:02 +02:00
|
|
|
};
|
2017-05-17 21:26:11 +02:00
|
|
|
buildInputs = [
|
|
|
|
qtbase qtsvg qtserialport qtwebkit qtmultimedia qttools zlib
|
2017-01-21 13:26:30 +01:00
|
|
|
qtconnectivity
|
2016-04-17 11:32:02 +02:00
|
|
|
];
|
2017-05-17 21:26:11 +02:00
|
|
|
nativeBuildInputs = [ flex makeWrapper qmake yacc ];
|
2016-04-21 02:12:49 +02:00
|
|
|
preConfigure = ''
|
2016-04-17 11:32:02 +02:00
|
|
|
cp src/gcconfig.pri.in src/gcconfig.pri
|
|
|
|
cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri
|
2016-08-31 18:37:05 +02:00
|
|
|
echo 'QMAKE_LRELEASE = ${qttools.dev}/bin/lrelease' >> src/gcconfig.pri
|
2016-04-17 11:32:02 +02:00
|
|
|
sed -i -e '21,23d' qwt/qwtconfig.pri # Removed forced installation to /usr/local
|
2016-04-19 12:13:33 +02:00
|
|
|
'';
|
2016-04-17 11:32:02 +02:00
|
|
|
installPhase = ''
|
2017-04-10 20:51:45 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
2016-04-17 11:32:02 +02:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cp src/GoldenCheetah $out/bin
|
2017-05-17 21:26:11 +02:00
|
|
|
wrapProgram $out/bin/GoldenCheetah --set LD_LIBRARY_PATH "${zlib.out}/lib"
|
2018-09-26 22:18:30 +02:00
|
|
|
install -Dm644 "${desktopItem}/share/applications/"* -t $out/share/applications/
|
|
|
|
install -Dm644 src/Resources/images/gc.png $out/share/pixmaps/goldencheetah.png
|
2017-04-10 20:51:45 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
2016-04-17 11:32:02 +02:00
|
|
|
'';
|
2017-12-05 16:34:39 +01:00
|
|
|
|
|
|
|
# RCC: Error in 'Resources/application.qrc': Cannot find file 'translations/gc_fr.qm'
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2018-09-01 13:49:57 +02:00
|
|
|
meta = with stdenv.lib; {
|
2016-04-17 11:32:02 +02:00
|
|
|
description = "Performance software for cyclists, runners and triathletes";
|
2018-09-01 13:49:57 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.ocharles ];
|
|
|
|
license = licenses.gpl3;
|
2016-04-17 11:32:02 +02:00
|
|
|
};
|
|
|
|
}
|