2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, makeDesktopItem
|
|
|
|
, jre
|
|
|
|
, gtk3
|
|
|
|
, glib
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
, wrapGAppsHook
|
|
|
|
, libXtst
|
|
|
|
, which
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "smartgithg";
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "22.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.syntevo.com/downloads/smartgit/smartgit-linux-${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.gz";
|
2022-12-02 08:20:57 +00:00
|
|
|
sha256 = "sha256-CcujqgvNvHK4Si1KJq3vRER3SID2XKPbOXL0zd+ezpU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ wrapGAppsHook ];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [ jre gnome.adwaita-icon-theme gtk3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
preFixup = with lib; ''
|
2020-04-24 23:36:52 +00:00
|
|
|
gappsWrapperArgs+=( \
|
|
|
|
--prefix PATH : ${makeBinPath [ jre which ]} \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${makeLibraryPath [
|
|
|
|
gtk3
|
|
|
|
glib
|
|
|
|
libXtst
|
|
|
|
]} \
|
|
|
|
--prefix JRE_HOME : ${jre} \
|
|
|
|
--prefix JAVA_HOME : ${jre} \
|
|
|
|
--prefix SMARTGITHG_JAVA_HOME : ${jre} \
|
2022-10-30 15:09:59 +00:00
|
|
|
)
|
|
|
|
# add missing shebang for start script
|
|
|
|
sed -i $out/bin/smartgit \
|
|
|
|
-e '1i#!/bin/bash'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
sed -i '/ --login/d' bin/smartgit.sh
|
|
|
|
mkdir -pv $out/{bin,share/applications,share/icons/hicolor/scalable/apps/}
|
|
|
|
cp -av ./{dictionaries,lib} $out/
|
|
|
|
cp -av bin/smartgit.sh $out/bin/smartgit
|
|
|
|
ln -sfv $out/bin/smartgit $out/bin/smartgithg
|
|
|
|
|
|
|
|
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/smartgit-$icon_size.png
|
|
|
|
mkdir -p $out/share/icons/hicolor/$path/apps
|
|
|
|
cp $icon $out/share/icons/hicolor/$path/apps/smartgit.png
|
|
|
|
done
|
|
|
|
|
|
|
|
cp -av bin/smartgit.svg $out/share/icons/hicolor/scalable/apps/
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
desktopItem = with lib; makeDesktopItem rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
name = "smartgit";
|
|
|
|
exec = "smartgit";
|
|
|
|
comment = meta.description;
|
|
|
|
icon = "smartgit";
|
|
|
|
desktopName = "SmartGit";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [
|
2020-04-24 23:36:52 +00:00
|
|
|
"Application"
|
|
|
|
"Development"
|
|
|
|
"RevisionControl"
|
|
|
|
];
|
2022-03-05 16:20:37 +00:00
|
|
|
mimeTypes = [
|
2020-04-24 23:36:52 +00:00
|
|
|
"x-scheme-handler/git"
|
|
|
|
"x-scheme-handler/smartgit"
|
|
|
|
"x-scheme-handler/sourcetree"
|
|
|
|
];
|
2022-03-05 16:20:37 +00:00
|
|
|
startupNotify = true;
|
|
|
|
startupWMClass = name;
|
|
|
|
keywords = [ "git" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "GUI for Git, Mercurial, Subversion";
|
|
|
|
homepage = "https://www.syntevo.com/smartgit/";
|
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.linux;
|
2021-01-17 00:15:33 +00:00
|
|
|
maintainers = with lib.maintainers; [ jraygauthier ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|