summary refs log tree commit diff
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-01-29 23:17:05 +0100
committerGitHub <noreply@github.com>2023-01-29 23:17:05 +0100
commitbea4062a62e18615421e8f4ce7bc339529f1c106 (patch)
tree3a27b42478ed75df54dc2d645a12b880b0587007
parent9c0508609a0e1f2e106e5da3492b2347f5a2099e (diff)
parent133f2623bd73eb1440d89ec3015eab3b30da4c22 (diff)
downloadnixpkgs-bea4062a62e18615421e8f4ce7bc339529f1c106.tar
nixpkgs-bea4062a62e18615421e8f4ce7bc339529f1c106.tar.gz
nixpkgs-bea4062a62e18615421e8f4ce7bc339529f1c106.tar.bz2
nixpkgs-bea4062a62e18615421e8f4ce7bc339529f1c106.tar.lz
nixpkgs-bea4062a62e18615421e8f4ce7bc339529f1c106.tar.xz
nixpkgs-bea4062a62e18615421e8f4ce7bc339529f1c106.tar.zst
nixpkgs-bea4062a62e18615421e8f4ce7bc339529f1c106.zip
Merge pull request #213429 from adamcstephens/cheetah/3.6-rc3
golden-cheetah: 3.6-DEV2111 -> 3.6-RC3
-rw-r--r--pkgs/applications/misc/golden-cheetah/0001-Fix-building-with-bison-3.7.patch46
-rw-r--r--pkgs/applications/misc/golden-cheetah/default.nix21
2 files changed, 31 insertions, 36 deletions
diff --git a/pkgs/applications/misc/golden-cheetah/0001-Fix-building-with-bison-3.7.patch b/pkgs/applications/misc/golden-cheetah/0001-Fix-building-with-bison-3.7.patch
index f8f725f7f68..f410d0f18b2 100644
--- a/pkgs/applications/misc/golden-cheetah/0001-Fix-building-with-bison-3.7.patch
+++ b/pkgs/applications/misc/golden-cheetah/0001-Fix-building-with-bison-3.7.patch
@@ -1,24 +1,5 @@
-From 8befa137776786829508f23dd33ab37e2b95a895 Mon Sep 17 00:00:00 2001
-From: Poncho <poncho@spahan.ch>
-Date: Mon, 7 Sep 2020 09:39:49 +0200
-Subject: [PATCH] Fix building with bison 3.7
-
-Bison 3.7 changes how header files are included [1][2], in that instead of
-copying and inserting the contents of a file, the file itself is included
-(by default as '"basename.h"').
-
-[1] https://lists.gnu.org/archive/html/info-gnu/2020-07/msg00006.html
-[2] https://www.gnu.org/software/bison/manual/html_node/_0025define-Summary.html
-
-Close: https://github.com/GoldenCheetah/GoldenCheetah/issues/3586
----
- src/Core/DataFilter.y     | 3 +++
- src/Core/RideDB.y         | 2 ++
- src/FileIO/JsonRideFile.y | 3 +++
- 3 files changed, 8 insertions(+)
-
 diff --git a/src/Core/DataFilter.y b/src/Core/DataFilter.y
-index 7c5e481b0..142e80a5c 100644
+index 30070f131..15f746a10 100644
 --- a/src/Core/DataFilter.y
 +++ b/src/Core/DataFilter.y
 @@ -49,6 +49,9 @@ extern Leaf *DataFilterroot; // root node for parsed statement
@@ -28,8 +9,8 @@ index 7c5e481b0..142e80a5c 100644
 +// generated by the scanner
 +%define api.header.include {"DataFilter_yacc.h"}
 +
- // Symbol can be meta or metric name
- %token <leaf> SYMBOL PYTHON
+ // Symbol can be meta, metric, variable or function name
+ %token <string> SYMBOL PYTHON
  
 diff --git a/src/Core/RideDB.y b/src/Core/RideDB.y
 index d6da086bd..f2001e23c 100644
@@ -58,6 +39,21 @@ index 2cbbef9fc..d5c77a779 100644
  %pure-parser
  %lex-param { void *scanner }
  %parse-param { struct JsonContext *jc }
--- 
-2.34.1
-
+diff --git a/src/gcconfig.pri.in b/src/gcconfig.pri.in
+index a280bbb6b..07e543372 100644
+--- a/src/gcconfig.pri.in
++++ b/src/gcconfig.pri.in
+@@ -75,10 +75,10 @@
+ 
+ # Let us know where flex and bison are installed.
+ # You may need to specify the full path if things don't work.
+-#QMAKE_LEX  = flex
+-#QMAKE_YACC = bison
++QMAKE_LEX  = flex
++QMAKE_YACC = bison
+ # If you are using bison 3.7 or higher, uncomment the line below
+-#QMAKE_MOVE = cp
++QMAKE_MOVE = cp
+ # If you're compiling with nmake and VC then you
+ # will likely also use win_flex and win_bison
+ # so uncomment below
diff --git a/pkgs/applications/misc/golden-cheetah/default.nix b/pkgs/applications/misc/golden-cheetah/default.nix
index 7f796a2bb0c..ee25c5e8cc0 100644
--- a/pkgs/applications/misc/golden-cheetah/default.nix
+++ b/pkgs/applications/misc/golden-cheetah/default.nix
@@ -1,7 +1,7 @@
 { lib, fetchFromGitHub, fetchpatch, mkDerivation
 , qtbase, qtsvg, qtserialport, qtwebengine, qtmultimedia, qttools
 , qtconnectivity, qtcharts, libusb-compat-0_1, gsl, blas
-, bison, flex, zlib, qmake, makeDesktopItem, makeWrapper
+, bison, flex, zlib, qmake, makeDesktopItem, wrapQtAppsHook
 }:
 
 let
@@ -16,13 +16,13 @@ let
   };
 in mkDerivation rec {
   pname = "golden-cheetah";
-  version = "3.6-DEV2111";
+  version = "3.6-RC3";
 
   src = fetchFromGitHub {
     owner = "GoldenCheetah";
     repo = "GoldenCheetah";
-    rev = "v${version}";
-    sha256 = "17sk89szvaq31bcv6rgfn1bbw132k7w8zlalfb3ayflavdxbk6sa";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-/LGVDeWJZZXy5r5WxElDuxUagpA/RIwHGRbkcdO8IrE=";
   };
 
   buildInputs = [
@@ -39,7 +39,7 @@ in mkDerivation rec {
     gsl
     blas
   ];
-  nativeBuildInputs = [ flex makeWrapper qmake bison ];
+  nativeBuildInputs = [ flex wrapQtAppsHook qmake bison ];
 
   patches = [
     # allow building with bison 3.7
@@ -55,11 +55,10 @@ in mkDerivation rec {
   preConfigure = ''
     cp src/gcconfig.pri.in src/gcconfig.pri
     cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri
-    echo 'QMAKE_LRELEASE = ${qttools.dev}/bin/lrelease' >> src/gcconfig.pri
-    echo 'LIBUSB_INSTALL = ${libusb-compat-0_1}' >> src/gcconfig.pri
-    echo 'LIBUSB_INCLUDE = ${libusb-compat-0_1.dev}/include' >> src/gcconfig.pri
-    echo 'LIBUSB_LIBS = -L${libusb-compat-0_1}/lib -lusb' >> src/gcconfig.pri
-    sed -i -e '21,23d' qwt/qwtconfig.pri # Removed forced installation to /usr/local
+    sed -i 's,^#QMAKE_LRELEASE.*,QMAKE_LRELEASE = ${qttools.dev}/bin/lrelease,' src/gcconfig.pri
+    sed -i 's,^#LIBUSB_INSTALL.*,LIBUSB_INSTALL = ${libusb-compat-0_1},' src/gcconfig.pri
+    sed -i 's,^#LIBUSB_INCLUDE.*,LIBUSB_INCLUDE = ${libusb-compat-0_1.dev}/include,' src/gcconfig.pri
+    sed -i 's,^#LIBUSB_LIBS.*,LIBUSB_LIBS = -L${libusb-compat-0_1}/lib -lusb,' src/gcconfig.pri
   '';
 
   installPhase = ''
@@ -76,7 +75,7 @@ in mkDerivation rec {
   meta = with lib; {
     description = "Performance software for cyclists, runners and triathletes";
     platforms = platforms.linux;
-    maintainers = [ ];
+    maintainers = with maintainers; [ adamcstephens ];
     license = licenses.gpl2Plus;
   };
 }