2014-09-11 07:28:29 +00:00
|
|
|
{ stdenv, fetchurl, lib, makeWrapper
|
2019-01-15 22:41:31 +00:00
|
|
|
, substituteAll
|
2014-09-14 14:33:24 +00:00
|
|
|
, jre
|
2016-09-11 21:24:51 +00:00
|
|
|
, gtk2, glib
|
2014-09-11 07:28:29 +00:00
|
|
|
, libXtst
|
|
|
|
, which
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-09-03 22:14:16 +00:00
|
|
|
name = "smartgithg-${version}";
|
2019-01-17 13:14:45 +00:00
|
|
|
version = "18.2.4";
|
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";
|
|
|
|
sha256 = "0ch6vcvndn1fpx05ym9yp2ssfw2af6ac0pw8ssvjkc676zc0jr73";
|
2014-09-11 07:28:29 +00:00
|
|
|
};
|
|
|
|
|
2016-10-12 23:15:35 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [ jre ];
|
2014-09-11 07:28:29 +00:00
|
|
|
|
|
|
|
buildCommand = let
|
|
|
|
pkg_path = "$out/${name}";
|
|
|
|
bin_path = "$out/bin";
|
2019-01-15 22:41:31 +00:00
|
|
|
install_freedesktop_items = substituteAll {
|
|
|
|
inherit (stdenv) shell;
|
|
|
|
src = ./install_freedesktop_items.sh;
|
|
|
|
};
|
2016-04-13 12:53:51 +00:00
|
|
|
runtime_paths = lib.makeBinPath [
|
2014-09-14 14:33:24 +00:00
|
|
|
jre
|
2016-02-10 22:02:18 +00:00
|
|
|
#git mercurial subversion # the paths are requested in configuration
|
2014-09-11 07:28:29 +00:00
|
|
|
which
|
|
|
|
];
|
|
|
|
runtime_lib_paths = lib.makeLibraryPath [
|
2016-09-11 21:24:51 +00:00
|
|
|
gtk2 glib
|
2014-09-11 07:28:29 +00:00
|
|
|
libXtst
|
|
|
|
];
|
|
|
|
in ''
|
|
|
|
tar xvzf $src
|
|
|
|
mkdir -pv $out
|
2014-12-27 08:28:38 +00:00
|
|
|
mkdir -pv ${pkg_path}
|
|
|
|
# unpacking should have produced a dir named 'smartgit'
|
|
|
|
cp -a smartgit/* ${pkg_path}
|
2018-08-21 18:51:54 +00:00
|
|
|
# prevent using packaged jre
|
|
|
|
rm -r ${pkg_path}/jre
|
2014-09-11 07:28:29 +00:00
|
|
|
mkdir -pv ${bin_path}
|
2015-01-01 23:49:20 +00:00
|
|
|
jre=${jre.home}
|
2014-12-27 08:28:38 +00:00
|
|
|
makeWrapper ${pkg_path}/bin/smartgit.sh ${bin_path}/smartgit \
|
2014-09-11 07:28:29 +00:00
|
|
|
--prefix PATH : ${runtime_paths} \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${runtime_lib_paths} \
|
2014-09-14 14:33:24 +00:00
|
|
|
--prefix JRE_HOME : ${jre} \
|
|
|
|
--prefix JAVA_HOME : ${jre} \
|
|
|
|
--prefix SMARTGITHG_JAVA_HOME : ${jre}
|
2018-08-21 18:51:54 +00:00
|
|
|
sed -i '/ --login/d' ${pkg_path}/bin/smartgit.sh
|
2014-09-11 07:28:29 +00:00
|
|
|
patchShebangs $out
|
2014-12-27 08:28:38 +00:00
|
|
|
cp ${bin_path}/smartgit ${bin_path}/smartgithg
|
2015-09-24 02:40:03 +00:00
|
|
|
|
|
|
|
${install_freedesktop_items} "${pkg_path}/bin" "$out"
|
2014-09-11 07:28:29 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "GUI for Git, Mercurial, Subversion";
|
2014-12-27 08:28:38 +00:00
|
|
|
homepage = http://www.syntevo.com/smartgit/;
|
2014-09-11 07:28:29 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.linux;
|
2016-03-11 20:23:03 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ jraygauthier ];
|
2014-09-11 07:28:29 +00:00
|
|
|
};
|
|
|
|
}
|