1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
{ stdenv, fetchurl, lib, makeWrapper
, jre
, gtk, glib
, libXtst
, git, mercurial, subversion
, which
}:
let
the_version = "6_5_3";
in
stdenv.mkDerivation rec {
name = "smartgithg-${the_version}";
src = fetchurl {
url = "http://www.syntevo.com/download/smartgit/" +
"smartgit-generic-${the_version}.tar.gz";
sha256 = "0hz1y29ipls58fizr27w6rbv7v7qbbc1h70xvjjd8c94k9ajmav9";
};
buildInputs = [
makeWrapper
jre
];
buildCommand = let
pkg_path = "$out/${name}";
bin_path = "$out/bin";
runtime_paths = lib.makeSearchPath "bin" [
jre
git mercurial subversion
which
];
runtime_lib_paths = lib.makeLibraryPath [
gtk glib
libXtst
];
in ''
tar xvzf $src
mkdir -pv $out
mkdir -pv ${pkg_path}
# unpacking should have produced a dir named 'smartgit'
cp -a smartgit/* ${pkg_path}
mkdir -pv ${bin_path}
jre=${jre.home}
makeWrapper ${pkg_path}/bin/smartgit.sh ${bin_path}/smartgit \
--prefix PATH : ${runtime_paths} \
--prefix LD_LIBRARY_PATH : ${runtime_lib_paths} \
--prefix JRE_HOME : ${jre} \
--prefix JAVA_HOME : ${jre} \
--prefix SMARTGITHG_JAVA_HOME : ${jre}
patchShebangs $out
cp ${bin_path}/smartgit ${bin_path}/smartgithg
'';
meta = with stdenv.lib; {
description = "GUI for Git, Mercurial, Subversion";
homepage = http://www.syntevo.com/smartgit/;
license = licenses.unfree;
platforms = platforms.linux;
};
}
|