nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 91 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 qmake, 6 nix-update-script, 7 qtbase, 8 qttools, 9 qtlocation ? null, # qt5 only 10 qtpositioning ? null, # qt6 only 11 qtserialport, 12 qtsvg, 13 wrapQtAppsHook, 14 wrapGAppsHook3, 15}: 16 17let 18 isQt6 = lib.versions.major qtbase.version == "6"; 19in 20stdenv.mkDerivation (finalAttrs: { 21 pname = "gpxsee"; 22 version = "13.45"; 23 24 src = fetchFromGitHub { 25 owner = "tumic0"; 26 repo = "GPXSee"; 27 tag = finalAttrs.version; 28 hash = "sha256-3GPpr8L+oMHCGXo3RVaky6EjDrEiBERRU6w56o17Xhc="; 29 }; 30 31 buildInputs = [ 32 qtserialport 33 ] 34 ++ ( 35 if isQt6 then 36 [ 37 qtbase 38 qtpositioning 39 qtsvg 40 ] 41 else 42 [ 43 qtlocation 44 ] 45 ); 46 47 nativeBuildInputs = [ 48 qmake 49 qttools 50 wrapQtAppsHook 51 wrapGAppsHook3 52 ]; 53 54 dontWrapGApps = true; 55 56 preFixup = '' 57 qtWrapperArgs+=(''${gappsWrapperArgs[@]}) 58 ''; 59 60 preConfigure = '' 61 lrelease gpxsee.pro 62 ''; 63 64 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' 65 mkdir -p $out/Applications 66 mv GPXSee.app $out/Applications 67 mkdir -p $out/bin 68 ln -s $out/Applications/GPXSee.app/Contents/MacOS/GPXSee $out/bin/gpxsee 69 ''; 70 71 passthru = { 72 updateScript = nix-update-script { }; 73 }; 74 75 meta = { 76 changelog = "https://build.opensuse.org/package/view_file/home:tumic:GPXSee/gpxsee/gpxsee.changes"; 77 description = "GPS log file viewer and analyzer"; 78 mainProgram = "gpxsee"; 79 homepage = "https://www.gpxsee.org/"; 80 license = lib.licenses.gpl3Only; 81 longDescription = '' 82 GPXSee is a Qt-based GPS log file viewer and analyzer that supports 83 all common GPS log file formats. 84 ''; 85 maintainers = with lib.maintainers; [ 86 womfoo 87 sikmir 88 ]; 89 platforms = lib.platforms.unix; 90 }; 91})