16 stdenv.mkDerivation rec {
21 url = "https://www.syntevo.com/downloads/smartgit/smartgit-linux-${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.gz";
22 hash = "sha256-UvdHr1L5MYwl7eT1BVS/M8Ydtw8VjDG+QuqMW0Q5La4=";
25 nativeBuildInputs = [ wrapGAppsHook3 ];
27 buildInputs = [ jre adwaita-icon-theme gtk3 ];
31 --prefix PATH : ${lib.makeBinPath [ jre which ]} \
32 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
37 --prefix JRE_HOME : ${jre} \
38 --prefix JAVA_HOME : ${jre} \
39 --prefix SMARTGITHG_JAVA_HOME : ${jre} \
41 # add missing shebang for start script
42 sed -i $out/bin/smartgit \
49 sed -i '/ --login/d' bin/smartgit.sh
50 mkdir -pv $out/{bin,share/applications,share/icons/hicolor/scalable/apps/}
51 cp -av ./{dictionaries,lib} $out/
52 cp -av bin/smartgit.sh $out/bin/smartgit
53 ln -sfv $out/bin/smartgit $out/bin/smartgithg
55 cp -av $desktopItem/share/applications/* $out/share/applications/
56 for icon_size in 32 48 64 128 256; do
57 path=$icon_size'x'$icon_size
58 icon=bin/smartgit-$icon_size.png
59 mkdir -p $out/share/icons/hicolor/$path/apps
60 cp $icon $out/share/icons/hicolor/$path/apps/smartgit.png
63 cp -av bin/smartgit.svg $out/share/icons/hicolor/scalable/apps/
68 desktopItem = makeDesktopItem rec {
71 comment = meta.description;
73 desktopName = "SmartGit";
80 "x-scheme-handler/git"
81 "x-scheme-handler/smartgit"
82 "x-scheme-handler/sourcetree"
85 startupWMClass = name;
90 description = "GUI for Git, Mercurial, Subversion";
91 homepage = "https://www.syntevo.com/smartgit/";
92 changelog = "https://www.syntevo.com/smartgit/changelog.txt";
93 license = licenses.unfree;
94 platforms = platforms.linux;
95 maintainers = with lib.maintainers; [ jraygauthier ];