From 3ac049fabe8ec3817fa3218c9fb97ada07b6814a Mon Sep 17 00:00:00 2001 From: Thomas Singer Date: Sat, 15 Mar 2025 19:04:55 +0100 Subject: [PATCH] smartsynchronize: init at 4.6.1 similar to "smartgit" --- pkgs/by-name/sm/smartsynchronize/package.nix | 104 +++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 pkgs/by-name/sm/smartsynchronize/package.nix diff --git a/pkgs/by-name/sm/smartsynchronize/package.nix b/pkgs/by-name/sm/smartsynchronize/package.nix new file mode 100644 index 000000000000..5dffdf8e96b8 --- /dev/null +++ b/pkgs/by-name/sm/smartsynchronize/package.nix @@ -0,0 +1,104 @@ +{ + lib, + stdenv, + fetchurl, + makeDesktopItem, + openjdk21, + gtk3, + glib, + adwaita-icon-theme, + wrapGAppsHook3, + libXtst, + which, +}: +let + jre = openjdk21; +in +stdenv.mkDerivation (finalAttrs: { + pname = "smartsynchronize"; + version = "4.6.1"; + + src = fetchurl { + url = "https://www.syntevo.com/downloads/smartsynchronize/smartsynchronize-linux-${ + builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version + }.tar.gz"; + hash = "sha256-oc1GFwiA6LPbCsCsGGENEz9ktcu0NINfQ9dsL27VIpI="; + }; + + nativeBuildInputs = [ wrapGAppsHook3 ]; + + buildInputs = [ + jre + adwaita-icon-theme + gtk3 + ]; + + preFixup = '' + gappsWrapperArgs+=( \ + --prefix PATH : ${ + lib.makeBinPath [ + jre + which + ] + } \ + --prefix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath [ + gtk3 + glib + libXtst + ] + } \ + --prefix JAVA_HOME : ${jre} \ + ) + ''; + + installPhase = '' + runHook preInstall + + mkdir -pv $out/{bin,share/applications,share/icons/hicolor/scalable/apps/} + cp -av ./lib $out/ + cp -av bin/smartsynchronize.sh $out/bin/smartsynchronize + + cp -av $desktopItem/share/applications/* $out/share/applications/ + for icon_size in 32 48 64 128 256; do + path=$icon_size'x'$icon_size + icon=bin/smartsynchronize-$icon_size.png + mkdir -p $out/share/icons/hicolor/$path/apps + cp $icon $out/share/icons/hicolor/$path/apps/smartsynchronize.png + done + + cp -av bin/smartsynchronize.svg $out/share/icons/hicolor/scalable/apps/ + + runHook postInstall + ''; + + desktopItem = makeDesktopItem { + name = "smartsynchronize"; + exec = "smartsynchronize"; + comment = finalAttrs.meta.description; + icon = "smartsynchronize"; + desktopName = "SmartSynchronize"; + categories = [ "Development" ]; + startupNotify = true; + startupWMClass = "smartsynchronize"; + keywords = [ + "compare" + "file manager" + ]; + }; + + meta = { + description = "File Manager, File/Directory Compare"; + longDescription = '' + SmartSynchronize is a dual-pane, keyboard-centric, multi-platform file manager. + It also is known for its file compare, directory compare and file merge. + SmartSynchronize is free to use for active Open Source developers and users from academic institutions. + ''; + homepage = "https://www.syntevo.com/smartsynchronize/"; + changelog = "https://www.syntevo.com/smartsynchronize/changelog-${lib.versions.majorMinor finalAttrs.version}.txt"; + license = lib.licenses.unfree; + mainProgram = "smartsynchronize"; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ tmssngr ]; + }; +})