2019-07-27 16:04:23 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, makeDesktopItem
|
2014-09-14 15:33:24 +01:00
|
|
|
, jre
|
2019-07-27 16:04:23 +01:00
|
|
|
, gtk3
|
|
|
|
, glib
|
|
|
|
, gnome3
|
|
|
|
, wrapGAppsHook
|
2014-09-11 08:28:29 +01:00
|
|
|
, libXtst
|
|
|
|
, which
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-27 16:04:23 +01:00
|
|
|
pname = "smartgithg";
|
2019-08-15 21:11:22 +01:00
|
|
|
version = "19.1.1";
|
2014-09-11 08:28:29 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-01-17 13:14:45 +00:00
|
|
|
url = "https://www.syntevo.com/downloads/smartgit/smartgit-linux-${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.gz";
|
2019-08-15 21:11:22 +01:00
|
|
|
sha256 = "0i0dvyy9d63f4hk8czlyk83ai0ywhqp7wbdkq3s87l7irwgs42jy";
|
2014-09-11 08:28:29 +01:00
|
|
|
};
|
|
|
|
|
2019-07-27 16:04:23 +01:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook ];
|
2016-10-13 00:15:35 +01:00
|
|
|
|
2019-09-12 15:25:05 +01:00
|
|
|
buildInputs = [ jre gnome3.adwaita-icon-theme gtk3 ];
|
2014-09-11 08:28:29 +01:00
|
|
|
|
2019-07-27 16:04:23 +01:00
|
|
|
preFixup = with stdenv.lib; ''
|
|
|
|
gappsWrapperArgs+=( \
|
|
|
|
--prefix PATH : ${makeBinPath [ jre which ]} \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${makeLibraryPath [
|
|
|
|
gtk3
|
|
|
|
glib
|
|
|
|
libXtst
|
|
|
|
]} \
|
2014-09-14 15:33:24 +01:00
|
|
|
--prefix JRE_HOME : ${jre} \
|
|
|
|
--prefix JAVA_HOME : ${jre} \
|
2019-07-27 16:04:23 +01:00
|
|
|
--prefix SMARTGITHG_JAVA_HOME : ${jre} \
|
|
|
|
) \
|
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
2015-09-24 03:40:03 +01:00
|
|
|
|
2019-07-27 16:04:23 +01:00
|
|
|
cp -av bin/smartgit.svg $out/share/icons/hicolor/scalable/apps/
|
|
|
|
|
|
|
|
runHook postInstall
|
2014-09-11 08:28:29 +01:00
|
|
|
'';
|
|
|
|
|
2019-07-27 16:04:23 +01:00
|
|
|
desktopItem = with stdenv.lib; makeDesktopItem rec {
|
|
|
|
name = "smartgit";
|
|
|
|
exec = "smartgit";
|
|
|
|
comment = meta.description;
|
|
|
|
icon = "smartgit";
|
|
|
|
desktopName = "SmartGit";
|
|
|
|
categories = concatStringsSep ";" [
|
|
|
|
"Application"
|
|
|
|
"Development"
|
|
|
|
"RevisionControl"
|
|
|
|
];
|
|
|
|
mimeType = concatStringsSep ";" [
|
|
|
|
"x-scheme-handler/git"
|
|
|
|
"x-scheme-handler/smartgit"
|
|
|
|
"x-scheme-handler/sourcetree"
|
|
|
|
];
|
|
|
|
startupNotify = "true";
|
|
|
|
extraEntries = ''
|
|
|
|
Keywords=git
|
|
|
|
StartupWMClass=${name}
|
|
|
|
Version=1.0
|
|
|
|
Encoding=UTF-8
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2014-09-11 08:28:29 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "GUI for Git, Mercurial, Subversion";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.syntevo.com/smartgit/";
|
2014-09-11 08:28:29 +01:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.linux;
|
2016-03-11 20:23:03 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ jraygauthier ];
|
2014-09-11 08:28:29 +01:00
|
|
|
};
|
|
|
|
}
|