2014-09-11 08:28:29 +01:00
|
|
|
{ stdenv, fetchurl, lib, makeWrapper
|
2014-09-14 15:33:24 +01:00
|
|
|
, jre
|
2014-09-11 08:28:29 +01:00
|
|
|
, gtk, glib
|
|
|
|
, libXtst
|
|
|
|
, git, mercurial, subversion
|
|
|
|
, which
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-09-03 23:14:16 +01:00
|
|
|
name = "smartgithg-${version}";
|
2015-09-24 03:40:03 +01:00
|
|
|
version = "7_0_2";
|
2014-09-11 08:28:29 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-09-03 23:14:16 +01:00
|
|
|
url = "http://www.syntevo.com/downloads/smartgit/smartgit-generic-${version}.tar.gz";
|
2015-09-24 03:40:03 +01:00
|
|
|
sha256 = "1jpi424aqy6niq31j750rgbspwii013c8kbi965i4jzjpba1pagi";
|
2014-09-11 08:28:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
makeWrapper
|
2014-09-14 15:33:24 +01:00
|
|
|
jre
|
2014-09-11 08:28:29 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildCommand = let
|
|
|
|
pkg_path = "$out/${name}";
|
|
|
|
bin_path = "$out/bin";
|
2015-09-24 03:40:03 +01:00
|
|
|
install_freedesktop_items = ./install_freedesktop_items.sh;
|
2014-09-11 08:28:29 +01:00
|
|
|
runtime_paths = lib.makeSearchPath "bin" [
|
2014-09-14 15:33:24 +01:00
|
|
|
jre
|
2014-09-11 08:28:29 +01:00
|
|
|
git mercurial subversion
|
|
|
|
which
|
|
|
|
];
|
|
|
|
runtime_lib_paths = lib.makeLibraryPath [
|
|
|
|
gtk glib
|
|
|
|
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}
|
2014-09-11 08:28:29 +01: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 08:28:29 +01:00
|
|
|
--prefix PATH : ${runtime_paths} \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${runtime_lib_paths} \
|
2014-09-14 15:33:24 +01:00
|
|
|
--prefix JRE_HOME : ${jre} \
|
|
|
|
--prefix JAVA_HOME : ${jre} \
|
|
|
|
--prefix SMARTGITHG_JAVA_HOME : ${jre}
|
2014-09-11 08:28:29 +01:00
|
|
|
patchShebangs $out
|
2014-12-27 08:28:38 +00:00
|
|
|
cp ${bin_path}/smartgit ${bin_path}/smartgithg
|
2015-09-24 03:40:03 +01:00
|
|
|
|
|
|
|
${install_freedesktop_items} "${pkg_path}/bin" "$out"
|
2014-09-11 08:28:29 +01: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 08:28:29 +01:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|