chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / sm / smartgithg / package.nix
blobd636c9d9b1eded5042bbf9fc12e84a643f22afa7
1 { lib
2 , stdenv
3 , fetchurl
4 , makeDesktopItem
5 , openjdk21
6 , gtk3
7 , glib
8 , adwaita-icon-theme
9 , wrapGAppsHook3
10 , libXtst
11 , which
13 let
14   jre = openjdk21;
16 stdenv.mkDerivation rec {
17   pname = "smartgithg";
18   version = "23.1.3";
20   src = fetchurl {
21     url = "https://www.syntevo.com/downloads/smartgit/smartgit-linux-${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.gz";
22     hash = "sha256-UvdHr1L5MYwl7eT1BVS/M8Ydtw8VjDG+QuqMW0Q5La4=";
23   };
25   nativeBuildInputs = [ wrapGAppsHook3 ];
27   buildInputs = [ jre adwaita-icon-theme gtk3 ];
29   preFixup = ''
30     gappsWrapperArgs+=( \
31       --prefix PATH : ${lib.makeBinPath [ jre which ]} \
32       --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
33         gtk3
34         glib
35         libXtst
36       ]} \
37       --prefix JRE_HOME : ${jre} \
38       --prefix JAVA_HOME : ${jre} \
39       --prefix SMARTGITHG_JAVA_HOME : ${jre} \
40     )
41     # add missing shebang for start script
42     sed -i $out/bin/smartgit \
43       -e '1i#!/bin/bash'
44   '';
46   installPhase = ''
47     runHook preInstall
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
61     done
63     cp -av bin/smartgit.svg $out/share/icons/hicolor/scalable/apps/
65     runHook postInstall
66   '';
68   desktopItem = makeDesktopItem rec {
69     name = "smartgit";
70     exec = "smartgit";
71     comment = meta.description;
72     icon = "smartgit";
73     desktopName = "SmartGit";
74     categories = [
75       "Application"
76       "Development"
77       "RevisionControl"
78     ];
79     mimeTypes = [
80       "x-scheme-handler/git"
81       "x-scheme-handler/smartgit"
82       "x-scheme-handler/sourcetree"
83     ];
84     startupNotify = true;
85     startupWMClass = name;
86     keywords = [ "git" ];
87   };
89   meta = with lib; {
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 ];
96   };