nixpkgs/pkgs/by-name/gi/gitnuro/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
2.0 KiB
Nix
Raw Normal View History

2022-10-30 08:57:38 +00:00
{ lib
, stdenv
, fetchurl
, makeWrapper
, copyDesktopItems
, makeDesktopItem
, jre
2024-01-03 16:26:00 +00:00
, libGL
2022-10-30 08:57:38 +00:00
}:
stdenv.mkDerivation rec {
pname = "gitnuro";
2024-11-22 02:15:08 +00:00
version = "1.4.2";
2022-10-30 08:57:38 +00:00
2024-06-01 14:01:58 +00:00
src = fetchurl (
if stdenv.hostPlatform.system == "x86_64-linux" then
{
url = "https://github.com/JetpackDuba/Gitnuro/releases/download/v${version}/Gitnuro-linux-x86_64-${version}.jar";
2024-11-22 02:15:08 +00:00
hash = "sha256-1lwuLPR6b1+I2SWaYaVrZkMcYVRAf1R7j/AwjQf03UM=";
2024-06-01 14:01:58 +00:00
}
else if stdenv.hostPlatform.system == "aarch64-linux" then
{
url = "https://github.com/JetpackDuba/Gitnuro/releases/download/v${version}/Gitnuro-linux-arm_aarch64-${version}.jar";
2024-11-22 02:15:08 +00:00
hash = "sha256-wnHW1YK4FKi5EDF/E0S+yr0tugtv3qVlCbT3+x9bM8s=";
2024-06-01 14:01:58 +00:00
}
else throw "Unsupported architecture: ${stdenv.hostPlatform.system}"
);
2022-10-30 08:57:38 +00:00
icon = fetchurl {
url = "https://raw.githubusercontent.com/JetpackDuba/Gitnuro/4cfc45069c176f807d9bfb1a7cba410257078d3c/icons/logo.svg";
hash = "sha256-QGJcWTSJesIpDArOWiS3Kn1iznzeMFzvqS+CuNXh3as=";
};
dontUnpack = true;
nativeBuildInputs = [
makeWrapper
copyDesktopItems
];
installPhase = ''
runHook preInstall
2024-01-03 16:26:00 +00:00
makeWrapper ${jre}/bin/java $out/bin/gitnuro \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \
--add-flags "-jar $src"
2022-10-30 08:57:38 +00:00
install -Dm444 $icon $out/share/icons/hicolor/scalable/apps/com.jetpackduba.Gitnuro.svg
2024-01-03 16:26:00 +00:00
2022-10-30 08:57:38 +00:00
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "Gitnuro";
exec = "gitnuro";
icon = "com.jetpackduba.Gitnuro";
desktopName = "Gitnuro";
categories = [ "Development" ];
comment = meta.description;
})
];
meta = with lib; {
description = "A FOSS Git multiplatform client based on Compose and JGit";
2024-01-10 19:50:41 +00:00
homepage = "https://gitnuro.com/";
2022-10-30 08:57:38 +00:00
license = licenses.gpl3Plus;
2024-06-01 14:01:58 +00:00
platforms = [ "x86_64-linux" "aarch64-linux" ];
2024-01-03 16:26:00 +00:00
sourceProvenance = with sourceTypes; [ binaryBytecode ];
2022-10-30 08:57:38 +00:00
maintainers = with maintainers; [ zendo ];
2023-11-27 01:17:53 +00:00
mainProgram = "gitnuro";
2022-10-30 08:57:38 +00:00
};
}