2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2019-07-27 15:04:23 +00:00
|
|
|
, fetchurl
|
|
|
|
, makeDesktopItem
|
2014-09-14 14:33:24 +00:00
|
|
|
, jre
|
2019-07-27 15:04:23 +00:00
|
|
|
, gtk3
|
|
|
|
, glib
|
|
|
|
, gnome3
|
|
|
|
, wrapGAppsHook
|
2014-09-11 07:28:29 +00:00
|
|
|
, libXtst
|
|
|
|
, which
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-27 15:04:23 +00:00
|
|
|
pname = "smartgithg";
|
2019-08-15 20:11:22 +00:00
|
|
|
version = "19.1.1";
|
2014-09-11 07:28:29 +00: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 20:11:22 +00:00
|
|
|
sha256 = "0i0dvyy9d63f4hk8czlyk83ai0ywhqp7wbdkq3s87l7irwgs42jy";
|
2014-09-11 07:28:29 +00:00
|
|
|
};
|
|
|
|
|
2019-07-27 15:04:23 +00:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook ];
|
2016-10-12 23:15:35 +00:00
|
|
|
|
2019-09-12 14:25:05 +00:00
|
|
|
buildInputs = [ jre gnome3.adwaita-icon-theme gtk3 ];
|
2014-09-11 07:28:29 +00:00
|
|
|
|
2021-01-15 13:21:58 +00:00
|
|
|
preFixup = with lib; ''
|
2019-07-27 15:04:23 +00:00
|
|
|
gappsWrapperArgs+=( \
|
|
|
|
--prefix PATH : ${makeBinPath [ jre which ]} \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${makeLibraryPath [
|
|
|
|
gtk3
|
|
|
|
glib
|
|
|
|
libXtst
|
|
|
|
]} \
|
2014-09-14 14:33:24 +00:00
|
|
|
--prefix JRE_HOME : ${jre} \
|
|
|
|
--prefix JAVA_HOME : ${jre} \
|
2019-07-27 15:04:23 +00: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 02:40:03 +00:00
|
|
|
|
2019-07-27 15:04:23 +00:00
|
|
|
cp -av bin/smartgit.svg $out/share/icons/hicolor/scalable/apps/
|
|
|
|
|
|
|
|
runHook postInstall
|
2014-09-11 07:28:29 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 13:21:58 +00:00
|
|
|
desktopItem = with lib; makeDesktopItem rec {
|
2019-07-27 15:04:23 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-09-11 07:28:29 +00:00
|
|
|
description = "GUI for Git, Mercurial, Subversion";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.syntevo.com/smartgit/";
|
2014-09-11 07:28:29 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.linux;
|
2021-01-15 13:21:58 +00:00
|
|
|
maintainers = with lib.maintainers; [ jraygauthier ];
|
2014-09-11 07:28:29 +00:00
|
|
|
};
|
|
|
|
}
|