about summary refs log tree commit diff
path: root/pkgs/applications/version-management/gitnuro/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/version-management/gitnuro/default.nix')
-rw-r--r--pkgs/applications/version-management/gitnuro/default.nix30
1 files changed, 23 insertions, 7 deletions
diff --git a/pkgs/applications/version-management/gitnuro/default.nix b/pkgs/applications/version-management/gitnuro/default.nix
index e577cbaa6f61c..8809f748e6b71 100644
--- a/pkgs/applications/version-management/gitnuro/default.nix
+++ b/pkgs/applications/version-management/gitnuro/default.nix
@@ -5,16 +5,26 @@
 , copyDesktopItems
 , makeDesktopItem
 , jre
+, libGL
 }:
 
 stdenv.mkDerivation rec {
   pname = "gitnuro";
-  version = "1.1.1";
+  version = "1.3.1";
 
-  src = fetchurl {
-    url = "https://github.com/JetpackDuba/Gitnuro/releases/download/v${version}/Gitnuro-linux-${version}.jar";
-    hash = "sha256-ugZBk/aQ2pjL9xY66g20MorAQ02GHIdJTv8ejadaBgY=";
-  };
+  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";
+      hash = "sha256-7yne9dD/7VT+H4tIBJvpOf8ksECCpoNAa8TSmFmjYMw=";
+    }
+    else if stdenv.hostPlatform.system == "aarch64-linux" then
+    {
+      url = "https://github.com/JetpackDuba/Gitnuro/releases/download/v${version}/Gitnuro-linux-arm_aarch64-${version}.jar";
+      hash = "sha256-6TRQfIhaKBjNPn3tEVWoUF92JAmwlHUtQZE8gKEZ/ZI=";
+    }
+    else throw "Unsupported architecture: ${stdenv.hostPlatform.system}"
+  );
 
   icon = fetchurl {
     url = "https://raw.githubusercontent.com/JetpackDuba/Gitnuro/4cfc45069c176f807d9bfb1a7cba410257078d3c/icons/logo.svg";
@@ -30,8 +40,13 @@ stdenv.mkDerivation rec {
 
   installPhase = ''
     runHook preInstall
-    makeWrapper ${jre}/bin/java $out/bin/gitnuro --add-flags "-jar $src"
+
+    makeWrapper ${jre}/bin/java $out/bin/gitnuro \
+      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \
+      --add-flags "-jar $src"
+
     install -Dm444 $icon $out/share/icons/hicolor/scalable/apps/com.jetpackduba.Gitnuro.svg
+
     runHook postInstall
   '';
 
@@ -50,7 +65,8 @@ stdenv.mkDerivation rec {
     description = "A FOSS Git multiplatform client based on Compose and JGit";
     homepage = "https://gitnuro.com/";
     license = licenses.gpl3Plus;
-    platforms = platforms.unix;
+    platforms = [ "x86_64-linux" "aarch64-linux" ];
+    sourceProvenance = with sourceTypes; [ binaryBytecode ];
     maintainers = with maintainers; [ zendo ];
     mainProgram = "gitnuro";
   };