Merge pull request #222884 from wegank/freefilesync-icons

freefilesync: add desktop items

authored by Weijia Wang and committed by GitHub b7496f96 00766fe9

+36 -15
+36 -15
pkgs/applications/networking/freefilesync/default.nix
··· 1 1 { lib 2 - , gcc12Stdenv 2 + , stdenv 3 3 , fetchFromGitHub 4 4 , fetchpatch 5 + , copyDesktopItems 5 6 , pkg-config 7 + , wrapGAppsHook 8 + , unzip 6 9 , curl 7 10 , glib 8 11 , gtk3 ··· 10 13 , openssl 11 14 , wxGTK32 12 15 , gitUpdater 13 - , wrapGAppsHook 16 + , makeDesktopItem 14 17 }: 15 18 16 - gcc12Stdenv.mkDerivation rec { 19 + stdenv.mkDerivation rec { 17 20 pname = "freefilesync"; 18 21 version = "12.1"; 19 22 ··· 24 27 hash = "sha256-KA3Bn8skJ2gMmihmwlUmN6jXZmfoYY/f4vqbKwvxwgw="; 25 28 }; 26 29 27 - # Patches from ROSA Linux 30 + # Patches from Debian 28 31 patches = [ 29 32 # Disable loading of the missing Animal.dat 30 33 (fetchpatch { 31 - url = "https://abf.io/import/freefilesync/raw/rosa2021.1-11.25-1/ffs_devuan.patch"; 32 - sha256 = "sha256-o8T/tBinlhM1I82yXxm0ogZcZf+uri95vTJrca5mcqs="; 34 + url = "https://sources.debian.org/data/main/f/freefilesync/12.0-2/debian/patches/ffs_devuan.patch"; 33 35 excludes = [ "FreeFileSync/Source/ffs_paths.cpp" ]; 34 - postFetch = '' 35 - substituteInPlace $out --replace " for Rosa" "" 36 - ''; 36 + hash = "sha256-6pHr5txabMTpGMKP7I5oe1lGAmgb0cPW8ZkPv/WXN74="; 37 37 }) 38 38 # Fix build with GTK 3 39 39 (fetchpatch { 40 - url = "https://abf.io/import/freefilesync/raw/rosa2021.1-11.25-1/ffs_devuan_gtk3.patch"; 41 - sha256 = "sha256-NXt/+BRTcMk8bnjR9Hipv1NzV9YqRJqy0e3RMInoWsA="; 42 - postFetch = '' 43 - substituteInPlace $out --replace "-isystem/usr/include/gtk-3.0" "" 44 - ''; 40 + url = "https://sources.debian.org/data/main/f/freefilesync/12.0-2/debian/patches/ffs_devuan_gtk3.patch"; 41 + hash = "sha256-0n58Np4JI3hYK/CRBytkPHl9Jp4xK+IRjgUvoYti/f4="; 45 42 }) 46 43 ]; 47 44 48 45 nativeBuildInputs = [ 46 + copyDesktopItems 47 + pkg-config 49 48 wrapGAppsHook 50 - pkg-config 49 + unzip 51 50 ]; 52 51 53 52 buildInputs = [ ··· 88 87 cp -R FreeFileSync/Build/* $out 89 88 mv $out/{Bin,bin} 90 89 90 + mkdir -p $out/share/pixmaps 91 + unzip -j $out/Resources/Icons.zip '*Sync.png' -d $out/share/pixmaps 92 + 91 93 runHook postInstall 92 94 ''; 95 + 96 + desktopItems = [ 97 + (makeDesktopItem rec { 98 + name = "FreeFileSync"; 99 + desktopName = name; 100 + genericName = "Folder Comparison and Synchronization"; 101 + icon = name; 102 + exec = name; 103 + categories = [ "Utility" "FileTools" ]; 104 + }) 105 + (makeDesktopItem rec { 106 + name = "RealTimeSync"; 107 + desktopName = name; 108 + genericName = "Automated Synchronization"; 109 + icon = name; 110 + exec = name; 111 + categories = [ "Utility" "FileTools" ]; 112 + }) 113 + ]; 93 114 94 115 passthru.updateScript = gitUpdater { 95 116 rev-prefix = "v";