lol

golden-cheetah: update to qt6, add darwin (#376565)

authored by

Adam C. Stephens and committed by
GitHub
fa9a43a8 77efc486

+123 -115
pkgs/applications/misc/golden-cheetah/0001-Fix-building-with-bison-3.7.patch pkgs/by-name/go/golden-cheetah/0001-Fix-building-with-bison-3.7.patch
-113
pkgs/applications/misc/golden-cheetah/default.nix
··· 1 - { 2 - lib, 3 - fetchFromGitHub, 4 - nix-update-script, 5 - mkDerivation, 6 - qtbase, 7 - qtsvg, 8 - qtserialport, 9 - qtwebengine, 10 - qtmultimedia, 11 - qttools, 12 - qtconnectivity, 13 - qtcharts, 14 - libusb-compat-0_1, 15 - gsl, 16 - blas, 17 - bison, 18 - flex, 19 - zlib, 20 - qmake, 21 - makeDesktopItem, 22 - wrapQtAppsHook, 23 - }: 24 - 25 - let 26 - desktopItem = makeDesktopItem { 27 - name = "goldencheetah"; 28 - exec = "GoldenCheetah"; 29 - icon = "goldencheetah"; 30 - desktopName = "GoldenCheetah"; 31 - genericName = "GoldenCheetah"; 32 - comment = "Performance software for cyclists, runners and triathletes"; 33 - categories = [ "Utility" ]; 34 - }; 35 - in 36 - mkDerivation rec { 37 - pname = "golden-cheetah"; 38 - version = "3.7-DEV2408"; 39 - 40 - src = fetchFromGitHub { 41 - owner = "GoldenCheetah"; 42 - repo = "GoldenCheetah"; 43 - tag = "v${version}"; 44 - hash = "sha256-6JAdnYaKULJsc/zdcTMbCkbOCbiVtnJivEazDKL721c="; 45 - }; 46 - 47 - buildInputs = [ 48 - qtbase 49 - qtsvg 50 - qtserialport 51 - qtwebengine 52 - qtmultimedia 53 - qttools 54 - zlib 55 - qtconnectivity 56 - qtcharts 57 - libusb-compat-0_1 58 - gsl 59 - blas 60 - ]; 61 - nativeBuildInputs = [ 62 - flex 63 - wrapQtAppsHook 64 - qmake 65 - bison 66 - ]; 67 - 68 - patches = [ 69 - # allow building with bison 3.7 70 - # Included in https://github.com/GoldenCheetah/GoldenCheetah/pull/3590, 71 - # which is periodically rebased but pre 3.6 release, as it'll break other CI systems 72 - ./0001-Fix-building-with-bison-3.7.patch 73 - ]; 74 - 75 - NIX_LDFLAGS = "-lz -lgsl -lblas"; 76 - 77 - qtWrapperArgs = [ 78 - "--prefix" 79 - "LD_LIBRARY_PATH" 80 - ":" 81 - "${zlib.out}/lib" 82 - ]; 83 - 84 - preConfigure = '' 85 - cp src/gcconfig.pri.in src/gcconfig.pri 86 - cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri 87 - sed -i 's,^#QMAKE_LRELEASE.*,QMAKE_LRELEASE = ${qttools.dev}/bin/lrelease,' src/gcconfig.pri 88 - sed -i 's,^#LIBUSB_INSTALL.*,LIBUSB_INSTALL = ${libusb-compat-0_1},' src/gcconfig.pri 89 - sed -i 's,^#LIBUSB_INCLUDE.*,LIBUSB_INCLUDE = ${libusb-compat-0_1.dev}/include,' src/gcconfig.pri 90 - sed -i 's,^#LIBUSB_LIBS.*,LIBUSB_LIBS = -L${libusb-compat-0_1}/lib -lusb,' src/gcconfig.pri 91 - ''; 92 - 93 - installPhase = '' 94 - runHook preInstall 95 - 96 - mkdir -p $out/bin 97 - cp src/GoldenCheetah $out/bin 98 - install -Dm644 "${desktopItem}/share/applications/"* -t $out/share/applications/ 99 - install -Dm644 src/Resources/images/gc.png $out/share/pixmaps/goldencheetah.png 100 - 101 - runHook postInstall 102 - ''; 103 - 104 - passthru.updateScript = nix-update-script { }; 105 - 106 - meta = { 107 - description = "Performance software for cyclists, runners and triathletes. Built from source and without API tokens"; 108 - mainProgram = "GoldenCheetah"; 109 - platforms = lib.platforms.linux; 110 - maintainers = with lib.maintainers; [ adamcstephens ]; 111 - license = lib.licenses.gpl2Plus; 112 - }; 113 - }
+123
pkgs/by-name/go/golden-cheetah/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + nix-update-script, 6 + qt6, 7 + libusb-compat-0_1, 8 + gsl, 9 + blas, 10 + bison, 11 + flex, 12 + zlib, 13 + makeDesktopItem, 14 + }: 15 + 16 + let 17 + desktopItem = makeDesktopItem { 18 + name = "goldencheetah"; 19 + exec = "GoldenCheetah"; 20 + icon = "goldencheetah"; 21 + desktopName = "GoldenCheetah"; 22 + genericName = "GoldenCheetah"; 23 + comment = "Performance software for cyclists, runners and triathletes"; 24 + categories = [ "Utility" ]; 25 + }; 26 + in 27 + stdenv.mkDerivation (finalAttrs: { 28 + pname = "golden-cheetah"; 29 + version = "3.7-DEV2408"; 30 + 31 + src = fetchFromGitHub { 32 + owner = "GoldenCheetah"; 33 + repo = "GoldenCheetah"; 34 + tag = "v${finalAttrs.version}"; 35 + hash = "sha256-6JAdnYaKULJsc/zdcTMbCkbOCbiVtnJivEazDKL721c="; 36 + }; 37 + 38 + buildInputs = 39 + with qt6; 40 + [ 41 + qt5compat 42 + qtbase 43 + qtcharts 44 + qtconnectivity 45 + qtmultimedia 46 + qtserialport 47 + qtsvg 48 + qttools 49 + qtwebengine 50 + ] 51 + ++ [ 52 + blas 53 + gsl 54 + libusb-compat-0_1 55 + zlib 56 + ]; 57 + nativeBuildInputs = 58 + [ 59 + bison 60 + flex 61 + ] 62 + ++ (with qt6; [ 63 + qmake 64 + wrapQtAppsHook 65 + ]); 66 + 67 + patches = [ 68 + # allow building with bison 3.7 69 + # Included in https://github.com/GoldenCheetah/GoldenCheetah/pull/3590, 70 + # which is periodically rebased but pre 3.6 release, as it'll break other CI systems 71 + ./0001-Fix-building-with-bison-3.7.patch 72 + ]; 73 + 74 + NIX_LDFLAGS = "-lz -lgsl -lblas"; 75 + 76 + qtWrapperArgs = [ 77 + "--prefix" 78 + "LD_LIBRARY_PATH" 79 + ":" 80 + "${zlib.out}/lib" 81 + ]; 82 + 83 + preConfigure = '' 84 + cp src/gcconfig.pri.in src/gcconfig.pri 85 + cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri 86 + sed -i 's,^#QMAKE_LRELEASE.*,QMAKE_LRELEASE = ${qt6.qttools.dev}/bin/lrelease,' src/gcconfig.pri 87 + sed -i 's,^#LIBUSB_INSTALL.*,LIBUSB_INSTALL = ${libusb-compat-0_1},' src/gcconfig.pri 88 + sed -i 's,^#LIBUSB_INCLUDE.*,LIBUSB_INCLUDE = ${libusb-compat-0_1.dev}/include,' src/gcconfig.pri 89 + sed -i 's,^#LIBUSB_LIBS.*,LIBUSB_LIBS = -L${libusb-compat-0_1}/lib -lusb,' src/gcconfig.pri 90 + ''; 91 + 92 + installPhase = 93 + if stdenv.isLinux then 94 + '' 95 + runHook preInstall 96 + 97 + mkdir -p $out/bin 98 + cp src/GoldenCheetah $out/bin 99 + install -Dm644 "${desktopItem}/share/applications/"* -t $out/share/applications/ 100 + install -Dm644 src/Resources/images/gc.png $out/share/pixmaps/goldencheetah.png 101 + 102 + runHook postInstall 103 + '' 104 + else if stdenv.isDarwin then 105 + '' 106 + runHook preInstall 107 + mkdir -p $out/Applications 108 + cp -r src/GoldenCheetah.app $out/Applications 109 + runHook postInstall 110 + '' 111 + else 112 + abort "unsupported platform"; 113 + 114 + passthru.updateScript = nix-update-script { }; 115 + 116 + meta = { 117 + description = "Performance software for cyclists, runners and triathletes. Built from source and without API tokens"; 118 + mainProgram = "GoldenCheetah"; 119 + platforms = with lib.platforms; darwin ++ linux; 120 + maintainers = with lib.maintainers; [ adamcstephens ]; 121 + license = lib.licenses.gpl2Plus; 122 + }; 123 + })
-2
pkgs/top-level/all-packages.nix
··· 18184 18184 18185 18185 discordo = callPackage ../applications/networking/discordo/default.nix { }; 18186 18186 18187 - golden-cheetah = libsForQt5.callPackage ../applications/misc/golden-cheetah { }; 18188 - 18189 18187 tomb = callPackage ../by-name/to/tomb/package.nix { 18190 18188 pinentry = pinentry-curses; 18191 18189 };