Files
nixpkgs/pkgs/by-name/sm/smartgit/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

117 lines
2.8 KiB
Nix

{
lib,
stdenv,
fetchurl,
makeDesktopItem,
openjdk21,
gtk3,
glib,
adwaita-icon-theme,
wrapGAppsHook3,
libXtst,
which,
}:
let
jre = openjdk21;
in
stdenv.mkDerivation (finalAttrs: {
pname = "smartgit";
version = "24.1.5";
src = fetchurl {
url = "https://www.syntevo.com/downloads/smartgit/smartgit-linux-${
builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version
}.tar.gz";
hash = "sha256-YqueTbwA9KcXEJG5TeWkPzzNyAnnJQ1+VQYsqZKS2/I=";
};
nativeBuildInputs = [ wrapGAppsHook3 ];
buildInputs = [
jre
adwaita-icon-theme
gtk3
];
preFixup = ''
gappsWrapperArgs+=( \
--prefix PATH : ${
lib.makeBinPath [
jre
which
]
} \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
gtk3
glib
libXtst
]
} \
--prefix SMARTGIT_JAVA_HOME : ${jre} \
)
# add missing shebang for start script
sed -i $out/bin/smartgit \
-e '1i#!/bin/bash'
'';
installPhase = ''
runHook preInstall
sed -i '/ --login/d' bin/smartgit.sh
mkdir -pv $out/{bin,share/applications,share/icons/hicolor/scalable/apps/}
cp -av ./{dictionaries,lib} $out/
cp -av bin/smartgit.sh $out/bin/smartgit
ln -sfv $out/bin/smartgit $out/bin/smartgithg
cp -av $desktopItem/share/applications/* $out/share/applications/
for icon_size in 32 48 64 128 256; do
path=$icon_size'x'$icon_size
icon=bin/smartgit-$icon_size.png
mkdir -p $out/share/icons/hicolor/$path/apps
cp $icon $out/share/icons/hicolor/$path/apps/smartgit.png
done
cp -av bin/smartgit.svg $out/share/icons/hicolor/scalable/apps/
runHook postInstall
'';
desktopItem = makeDesktopItem {
name = "smartgit";
exec = "smartgit";
comment = finalAttrs.meta.description;
icon = "smartgit";
desktopName = "SmartGit";
categories = [
"Development"
"RevisionControl"
];
mimeTypes = [
"x-scheme-handler/git"
"x-scheme-handler/smartgit"
"x-scheme-handler/sourcetree"
];
startupNotify = true;
startupWMClass = "smartgit";
keywords = [ "git" ];
};
meta = {
description = "Git GUI client";
longDescription = ''
SmartGit is a multi-platform Git GUI client, free to use for active Open Source developers and users from academic institutions.
Command line Git is required.
'';
homepage = "https://www.syntevo.com/smartgit/";
changelog = "https://www.syntevo.com/smartgit/changelog-${lib.versions.majorMinor finalAttrs.version}.txt";
license = lib.licenses.unfree;
mainProgram = "smartgit";
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
jraygauthier
tmssngr
];
};
})