nixpkgs/pkgs/by-name/de/deepgit/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

98 lines
2.0 KiB
Nix

{
copyDesktopItems,
fetchurl,
glib,
adwaita-icon-theme,
gtk3,
jre,
lib,
makeDesktopItem,
stdenv,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "deepgit";
version = "4.4";
src = fetchurl {
url = "https://www.syntevo.com/downloads/deepgit/deepgit-linux-${
lib.replaceStrings [ "." ] [ "_" ] version
}.tar.gz";
hash = "sha256-ILqwXDyW7/hZzoSxxaxv4bF5xsB/JFaOBYAJFb7xmdk=";
};
nativeBuildInputs = [
copyDesktopItems
wrapGAppsHook3
];
buildInputs = [
adwaita-icon-theme
gtk3
jre
];
preFixup = ''
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
glib
gtk3
]
}
--set DEEPGIT_JAVA_HOME ${jre}
)
patchShebangs bin/deepgit.sh
'';
desktopItems = [
(makeDesktopItem rec {
name = pname;
desktopName = "DeepGit";
keywords = [ "git" ];
comment = "Git-Client";
categories = [
"Development"
"RevisionControl"
];
terminal = false;
startupNotify = true;
startupWMClass = desktopName;
exec = pname;
mimeTypes = [
"x-scheme-handler/${pname}"
"x-scheme-handler/sourcetree"
];
icon = pname;
})
];
installPhase = ''
runHook preInstall
mkdir -pv $out/{bin,share/icons/hicolor/scalable/apps/}
cp -a lib license.html $out
mv bin/deepgit.sh $out/bin/deepgit
for icon_size in 32 48 64 128 256; do
path=$icon_size'x'$icon_size
icon=bin/deepgit-$icon_size.png
mkdir -p $out/share/icons/hicolor/$path/apps
cp $icon $out/share/icons/hicolor/$path/apps/deepgit.png
done
runHook postInstall
'';
meta = with lib; {
description = "Tool to investigate the history of source code";
homepage = "https://www.syntevo.com/deepgit";
changelog = "https://www.syntevo.com/deepgit/changelog.txt";
license = licenses.unfree;
maintainers = with maintainers; [ urandom ];
platforms = platforms.linux;
mainProgram = "deepgit";
};
}