42 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | |
|   lib,
 | |
|   fetchurl,
 | |
|   appimageTools,
 | |
| }: let
 | |
|   pname = "mapillary-uploader";
 | |
|   version = "4.7.2";
 | |
| 
 | |
|   src = fetchurl {
 | |
|     url = "http://tools.mapillary.com/uploader/download/linux/${version}";
 | |
|     name = "mapillary-uploader.AppImage";
 | |
|     sha256 = "sha256-Oyx7AIdA/2mwBaq7UzXOoyq/z2SU2sViMN40sY2RCQw=";
 | |
|   };
 | |
| 
 | |
|   appimageContents = appimageTools.extractType2 {
 | |
|     inherit pname version src;
 | |
|   };
 | |
| in
 | |
|   appimageTools.wrapType2 {
 | |
|     inherit pname version src;
 | |
| 
 | |
|     extraInstallCommands = ''
 | |
|       # Install desktop file
 | |
|       install -Dm644 ${appimageContents}/mapillary-desktop-uploader.desktop $out/share/applications/mapillary-uploader.desktop
 | |
| 
 | |
|       # Install icon
 | |
|       install -Dm644 ${appimageContents}/usr/share/icons/hicolor/0x0/apps/mapillary-desktop-uploader.png $out/share/pixmaps/mapillary-uploader.png
 | |
| 
 | |
|       # Fix desktop file paths
 | |
|       substituteInPlace $out/share/applications/mapillary-uploader.desktop \
 | |
|         --replace 'Exec=AppRun' 'Exec=${pname}'
 | |
|     '';
 | |
| 
 | |
|     meta = with lib; {
 | |
|       description = "Mapillary Desktop Uploader - Upload street-level imagery to Mapillary";
 | |
|       homepage = "https://www.mapillary.com/";
 | |
|       license = licenses.unfree; # Mapillary's license terms
 | |
|       maintainers = [];
 | |
|       platforms = ["x86_64-linux"];
 | |
|       sourceProvenance = with sourceTypes; [binaryNativeCode];
 | |
|     };
 | |
|   }
 |