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 { lib 2 - , gcc12Stdenv 3 , fetchFromGitHub 4 , fetchpatch 5 , pkg-config 6 , curl 7 , glib 8 , gtk3 ··· 10 , openssl 11 , wxGTK32 12 , gitUpdater 13 - , wrapGAppsHook 14 }: 15 16 - gcc12Stdenv.mkDerivation rec { 17 pname = "freefilesync"; 18 version = "12.1"; 19 ··· 24 hash = "sha256-KA3Bn8skJ2gMmihmwlUmN6jXZmfoYY/f4vqbKwvxwgw="; 25 }; 26 27 - # Patches from ROSA Linux 28 patches = [ 29 # Disable loading of the missing Animal.dat 30 (fetchpatch { 31 - url = "https://abf.io/import/freefilesync/raw/rosa2021.1-11.25-1/ffs_devuan.patch"; 32 - sha256 = "sha256-o8T/tBinlhM1I82yXxm0ogZcZf+uri95vTJrca5mcqs="; 33 excludes = [ "FreeFileSync/Source/ffs_paths.cpp" ]; 34 - postFetch = '' 35 - substituteInPlace $out --replace " for Rosa" "" 36 - ''; 37 }) 38 # Fix build with GTK 3 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 - ''; 45 }) 46 ]; 47 48 nativeBuildInputs = [ 49 wrapGAppsHook 50 - pkg-config 51 ]; 52 53 buildInputs = [ ··· 88 cp -R FreeFileSync/Build/* $out 89 mv $out/{Bin,bin} 90 91 runHook postInstall 92 ''; 93 94 passthru.updateScript = gitUpdater { 95 rev-prefix = "v";
··· 1 { lib 2 + , stdenv 3 , fetchFromGitHub 4 , fetchpatch 5 + , copyDesktopItems 6 , pkg-config 7 + , wrapGAppsHook 8 + , unzip 9 , curl 10 , glib 11 , gtk3 ··· 13 , openssl 14 , wxGTK32 15 , gitUpdater 16 + , makeDesktopItem 17 }: 18 19 + stdenv.mkDerivation rec { 20 pname = "freefilesync"; 21 version = "12.1"; 22 ··· 27 hash = "sha256-KA3Bn8skJ2gMmihmwlUmN6jXZmfoYY/f4vqbKwvxwgw="; 28 }; 29 30 + # Patches from Debian 31 patches = [ 32 # Disable loading of the missing Animal.dat 33 (fetchpatch { 34 + url = "https://sources.debian.org/data/main/f/freefilesync/12.0-2/debian/patches/ffs_devuan.patch"; 35 excludes = [ "FreeFileSync/Source/ffs_paths.cpp" ]; 36 + hash = "sha256-6pHr5txabMTpGMKP7I5oe1lGAmgb0cPW8ZkPv/WXN74="; 37 }) 38 # Fix build with GTK 3 39 (fetchpatch { 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="; 42 }) 43 ]; 44 45 nativeBuildInputs = [ 46 + copyDesktopItems 47 + pkg-config 48 wrapGAppsHook 49 + unzip 50 ]; 51 52 buildInputs = [ ··· 87 cp -R FreeFileSync/Build/* $out 88 mv $out/{Bin,bin} 89 90 + mkdir -p $out/share/pixmaps 91 + unzip -j $out/Resources/Icons.zip '*Sync.png' -d $out/share/pixmaps 92 + 93 runHook postInstall 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 + ]; 114 115 passthru.updateScript = gitUpdater { 116 rev-prefix = "v";