Giter Site home page Giter Site logo

Comments (19)

julius-boettger avatar julius-boettger commented on May 27, 2024 2

This PR will fix the issue for the official gitnuro package in nixpkgs. I tried out its changed package definition for Gitnuro, and it works like a charm. Thank you for your effort!

from gitnuro.

julius-boettger avatar julius-boettger commented on May 27, 2024 1

Alright, thank you for your effort. I guess I will try asking for help in a NixOS forum. I will comment again here if I find a fix.

from gitnuro.

JetpackDuba avatar JetpackDuba commented on May 27, 2024

Are you using the plain JAR or Flatpak?

from gitnuro.

julius-boettger avatar julius-boettger commented on May 27, 2024

I am using the plain JAR.
More specifically I am using the following Nix Derivation to install Gitnuro 1.3.1:

{ stdenv
, fetchurl
, makeWrapper
, copyDesktopItems
, makeDesktopItem
, jre
}:

stdenv.mkDerivation rec {
  pname = "gitnuro";
  version = "1.3.1";

  src = fetchurl {
    url = "https://github.com/JetpackDuba/Gitnuro/releases/download/v${version}/Gitnuro-linux-x86_64-${version}.jar";
    hash = "sha256-7yne9dD/7VT+H4tIBJvpOf8ksECCpoNAa8TSmFmjYMw=";
  };

  icon = fetchurl {
    url = "https://raw.githubusercontent.com/JetpackDuba/Gitnuro/main/icons/logo.svg";
    hash = "sha256-QGJcWTSJesIpDArOWiS3Kn1iznzeMFzvqS+CuNXh3as=";
  };

  dontUnpack = true;

  nativeBuildInputs = [
    makeWrapper
    copyDesktopItems
  ];

  installPhase = ''
    runHook preInstall
    makeWrapper ${jre}/bin/java $out/bin/gitnuro --add-flags "-jar $src"
    install -Dm444 $icon $out/share/icons/hicolor/scalable/apps/com.jetpackduba.Gitnuro.svg
    runHook postInstall
  '';

  desktopItems = [
    (makeDesktopItem {
      name = "Gitnuro";
      exec = "gitnuro";
      icon = "com.jetpackduba.Gitnuro";
      desktopName = "Gitnuro";
      categories = [ "Development" ];
      comment = "A FOSS Git multiplatform client based on Compose and JGit";
    })
  ];
}

from gitnuro.

julius-boettger avatar julius-boettger commented on May 27, 2024

Okay, so I just tried the Flatpak instead of the JAR. It works, although I get some warnings similar to the errors when trying to start the JAR:

> flatpak run com.jetpackduba.Gitnuro
log4j:WARN No appenders could be found for logger (org.slf4j).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

from gitnuro.

JetpackDuba avatar JetpackDuba commented on May 27, 2024

You can ignore these messages, as the logging is reconfigured at runtime after the first initialization.

As for why does the JAR fail, it seems that libGL was removed from your system during the upgrade process. Perhaps installing it back will fix it? The Flatpak version works because flatpak probably includes it by default.

from gitnuro.

julius-boettger avatar julius-boettger commented on May 27, 2024

I tried installing libGL, libGLU and libglibutil from nixpkgs, but that doesn't change anything, sadly.

from gitnuro.

julius-boettger avatar julius-boettger commented on May 27, 2024

I also just noticed that the Flatpak version does not allow me to open a repository located in /etc, which I have used with the Gitnuro JAR up until now with no problems. I get the following error dialogue:
image
And the terminal output

2023-12-04 15:38:26 INFO  slf4j:8 - TabViewModel - Trying to open repository /etc/dotfiles
org.eclipse.jgit.errors.NoWorkTreeException: Bare Repository has neither a working tree, nor an index
	at org.eclipse.jgit.lib.Repository.getWorkTree(Repository.java:1582)
	at com.jetpackduba.gitnuro.viewmodels.TabViewModel$openRepository$1.invokeSuspend(TabViewModel.kt:161)
	at com.jetpackduba.gitnuro.viewmodels.TabViewModel$openRepository$1.invoke(TabViewModel.kt)
	at com.jetpackduba.gitnuro.viewmodels.TabViewModel$openRepository$1.invoke(TabViewModel.kt)
	at com.jetpackduba.gitnuro.git.TabState$safeProcessingWithoutGit$job$1.invokeSuspend(TabState.kt:189)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Is this an intended part of Flatpak's sandboxing, or does it deserve its own issue here?

from gitnuro.

JetpackDuba avatar JetpackDuba commented on May 27, 2024

It's part of Flatpak's sandboxing, I think that you can use flatseal to add permission to the directory.

I tried installing libGL, libGLU and libglibutil from nixpkgs, but that doesn't change anything, sadly.

Can you run this to list the installed libs? ldconfig -p | grep libGL

from gitnuro.

julius-boettger avatar julius-boettger commented on May 27, 2024

It's part of Flatpak's sandboxing, I think that you can use flatseal to add permission to the directory.

Alright, then I will try that.

Can you run this to list the installed libs? ldconfig -p | grep libGL

This command seems to run into an issue similar to Gitnuro's:

> ldconfig -p | grep libGL
ldconfig: Can't open cache file /nix/store/qn3ggz5sf3hkjs2c797xf7nan3amdxmp-glibc-2.38-27/etc/ld.so.cache
: No such file or directory

I found something about this behaviour in this issue. Although I don't fully understand what this is about, it seems like NixOS intentionally does not have an ld.cache, which is why the command fails.

If this is the case, then I don't understand why I'm running into this issue for the first time now, as this is quite an old issue.

from gitnuro.

JetpackDuba avatar JetpackDuba commented on May 27, 2024

Ah I wanted you to run this command just to list the installed libraries, nothing related to Gitnuro.

I'm not familiar enough with NixOS, but I guess that using a find command would be possible too: sudo find / -name "libGL.so*". Just wanted to verify if the dependency is properly installed.

from gitnuro.

julius-boettger avatar julius-boettger commented on May 27, 2024

find works. Keep in mind that directories in /nix/store are managed by NixOS and contain a hash of their content in the directory name.

> sudo find / -name "libGL.so*"
find: ‘/run/user/1000/gvfs’: Permission denied
find: ‘/run/user/1000/doc’: Permission denied
find: ‘/proc/1742/task/1742/net’: Invalid argument
find: ‘/proc/1742/net’: Invalid argument
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/22.08/12e6f0416b1a1c32dc29994ee8068725e114198bd7cee570039df3f89bef5167/files/lib/x86_64-linux-gnu/libGL.so.1
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/22.08/12e6f0416b1a1c32dc29994ee8068725e114198bd7cee570039df3f89bef5167/files/lib/x86_64-linux-gnu/libGL.so.1.7.0
/var/lib/flatpak/runtime/org.gnome.Platform/x86_64/45/22e0bd575bdd7f0391fe19e346627198d00d1726957675dfad61a26476122dcb/files/lib/x86_64-linux-gnu/libGL.so.1
/var/lib/flatpak/runtime/org.gnome.Platform/x86_64/45/22e0bd575bdd7f0391fe19e346627198d00d1726957675dfad61a26476122dcb/files/lib/x86_64-linux-gnu/libGL.so.1.7.0
/nix/store/36hfsb2jjzhn5pgmh140vjxh97spmql3-libglvnd-1.6.0/lib/libGL.so.1
/nix/store/36hfsb2jjzhn5pgmh140vjxh97spmql3-libglvnd-1.6.0/lib/libGL.so
/nix/store/36hfsb2jjzhn5pgmh140vjxh97spmql3-libglvnd-1.6.0/lib/libGL.so.1.7.0
/nix/store/y1cpinq9fs2gkmxbdm9fcnygyyszjvyd-user-environment/lib/libGL.so.1
/nix/store/y1cpinq9fs2gkmxbdm9fcnygyyszjvyd-user-environment/lib/libGL.so
/nix/store/y1cpinq9fs2gkmxbdm9fcnygyyszjvyd-user-environment/lib/libGL.so.1.7.0
/nix/store/83rzx3ki1rqkl5lnz0nzq076w996f4rq-user-environment/lib/libGL.so.1
/nix/store/83rzx3ki1rqkl5lnz0nzq076w996f4rq-user-environment/lib/libGL.so
/nix/store/83rzx3ki1rqkl5lnz0nzq076w996f4rq-user-environment/lib/libGL.so.1.7.0
/nix/store/5asb6r1c2hxc7wlnriw25sizg4jvv4gi-user-environment/lib/libGL.so.1
/nix/store/5asb6r1c2hxc7wlnriw25sizg4jvv4gi-user-environment/lib/libGL.so
/nix/store/5asb6r1c2hxc7wlnriw25sizg4jvv4gi-user-environment/lib/libGL.so.1.7.0
/nix/store/8d3jb52mhi9rl0842pixzlwx4rq3npy2-libglvnd-1.6.0/lib/libGL.so.1
/nix/store/8d3jb52mhi9rl0842pixzlwx4rq3npy2-libglvnd-1.6.0/lib/libGL.so
/nix/store/8d3jb52mhi9rl0842pixzlwx4rq3npy2-libglvnd-1.6.0/lib/libGL.so.1.7.0
/nix/store/ppwcp29llynp6wzb9mkh693i91a0w74j-libglvnd-1.6.0/lib/libGL.so.1
/nix/store/ppwcp29llynp6wzb9mkh693i91a0w74j-libglvnd-1.6.0/lib/libGL.so
/nix/store/ppwcp29llynp6wzb9mkh693i91a0w74j-libglvnd-1.6.0/lib/libGL.so.1.7.0
/nix/store/vnjrm8a54383r8pmm22awhr69gxxd79z-libglvnd-1.6.0/lib/libGL.so.1
/nix/store/vnjrm8a54383r8pmm22awhr69gxxd79z-libglvnd-1.6.0/lib/libGL.so
/nix/store/vnjrm8a54383r8pmm22awhr69gxxd79z-libglvnd-1.6.0/lib/libGL.so.1.7.0
/nix/store/1k87lf3ar245hg06kw4fynv4vmcj6pzc-libglvnd-1.6.0/lib/libGL.so.1
/nix/store/1k87lf3ar245hg06kw4fynv4vmcj6pzc-libglvnd-1.6.0/lib/libGL.so
/nix/store/1k87lf3ar245hg06kw4fynv4vmcj6pzc-libglvnd-1.6.0/lib/libGL.so.1.7.0
/nix/store/jai888152djsa0496lm5m04lxwkm1vly-libglvnd-1.7.0/lib/libGL.so.1
/nix/store/jai888152djsa0496lm5m04lxwkm1vly-libglvnd-1.7.0/lib/libGL.so
/nix/store/jai888152djsa0496lm5m04lxwkm1vly-libglvnd-1.7.0/lib/libGL.so.1.7.0
/nix/store/2bzq7fmdpd83d606gh6ifbmx34g9yrbm-system-path/lib/libGL.so.1
/nix/store/2bzq7fmdpd83d606gh6ifbmx34g9yrbm-system-path/lib/libGL.so
/nix/store/2bzq7fmdpd83d606gh6ifbmx34g9yrbm-system-path/lib/libGL.so.1.7.0
/nix/store/yw48bqgswppkcrx303ybgbn6r2nqbda1-libglvnd-1.7.0/lib/libGL.so.1
/nix/store/yw48bqgswppkcrx303ybgbn6r2nqbda1-libglvnd-1.7.0/lib/libGL.so
/nix/store/yw48bqgswppkcrx303ybgbn6r2nqbda1-libglvnd-1.7.0/lib/libGL.so.1.7.0
/nix/store/vyn768c7nq7a8hwyzbkiik3ih6d0rpwx-libglvnd-1.7.0/lib/libGL.so.1
/nix/store/vyn768c7nq7a8hwyzbkiik3ih6d0rpwx-libglvnd-1.7.0/lib/libGL.so
/nix/store/vyn768c7nq7a8hwyzbkiik3ih6d0rpwx-libglvnd-1.7.0/lib/libGL.so.1.7.0
/nix/store/3nbvki8kpyni8nq8q6dbzhrmrpgcbvyz-libglvnd-1.6.0/lib/libGL.so.1
/nix/store/3nbvki8kpyni8nq8q6dbzhrmrpgcbvyz-libglvnd-1.6.0/lib/libGL.so
/nix/store/3nbvki8kpyni8nq8q6dbzhrmrpgcbvyz-libglvnd-1.6.0/lib/libGL.so.1.7.0
/nix/store/p203lgdn66r61in95pk9z2gpbadg159f-system-path/lib/libGL.so.1
/nix/store/p203lgdn66r61in95pk9z2gpbadg159f-system-path/lib/libGL.so
/nix/store/p203lgdn66r61in95pk9z2gpbadg159f-system-path/lib/libGL.so.1.7.0
/nix/store/9i4qfl1vl4mcm9l43d52d3sv5bi3nq9z-system-path/lib/libGL.so.1
/nix/store/9i4qfl1vl4mcm9l43d52d3sv5bi3nq9z-system-path/lib/libGL.so
/nix/store/9i4qfl1vl4mcm9l43d52d3sv5bi3nq9z-system-path/lib/libGL.so.1.7.0
/nix/store/nvab3s2py3nb87464l48sibbd921xg1h-system-path/lib/libGL.so.1
/nix/store/nvab3s2py3nb87464l48sibbd921xg1h-system-path/lib/libGL.so
/nix/store/nvab3s2py3nb87464l48sibbd921xg1h-system-path/lib/libGL.so.1.7.0
/nix/store/ddr4jz8pcd9040rsnyz91x5b38k2z6pi-system-path/lib/libGL.so.1
/nix/store/ddr4jz8pcd9040rsnyz91x5b38k2z6pi-system-path/lib/libGL.so
/nix/store/ddr4jz8pcd9040rsnyz91x5b38k2z6pi-system-path/lib/libGL.so.1.7.0
/nix/store/1v7iw4cfb4k6hk7a5mal7ppi3dx0day1-system-path/lib/libGL.so.1
/nix/store/1v7iw4cfb4k6hk7a5mal7ppi3dx0day1-system-path/lib/libGL.so
/nix/store/1v7iw4cfb4k6hk7a5mal7ppi3dx0day1-system-path/lib/libGL.so.1.7.0
/nix/store/fag12n4m3mapvd59s1cjbc2zhr3mpbpg-system-path/lib/libGL.so.1
/nix/store/fag12n4m3mapvd59s1cjbc2zhr3mpbpg-system-path/lib/libGL.so
/nix/store/fag12n4m3mapvd59s1cjbc2zhr3mpbpg-system-path/lib/libGL.so.1.7.0
/nix/store/ri8zm2q14pcv4s1hkmg8gbkgzc16m0lg-system-path/lib/libGL.so.1
/nix/store/ri8zm2q14pcv4s1hkmg8gbkgzc16m0lg-system-path/lib/libGL.so
/nix/store/ri8zm2q14pcv4s1hkmg8gbkgzc16m0lg-system-path/lib/libGL.so.1.7.0

from gitnuro.

JetpackDuba avatar JetpackDuba commented on May 27, 2024

Uh I'm not familiar with such system, I guess I'll have to install it myself and check. I'll try to give an answer in a few days.

from gitnuro.

julius-boettger avatar julius-boettger commented on May 27, 2024

Thank you for your effort. If you have anything I could help with, e.g. questions about NixOS, feel free to contact me. I will try my best to help, I use Gitnuro daily and would love to have it up and running correctly again. Sadly I don't think I'm capable of debugging this issue on my own much further, I don't even know where to start. But if you have anything for me to try out I can offer to do that.

from gitnuro.

JetpackDuba avatar JetpackDuba commented on May 27, 2024

I've been looking into it but I'm not familiar enough with the package manager. Do you know if there is some way to add a dependency the script you posted?

AFAIK, nix packages can't access system dependencies as it would happen in other system (correct me if I'm wrong).

from gitnuro.

BasilYes avatar BasilYes commented on May 27, 2024

If this guide correct, to add dependency you just need to specify libraries with
buildInputs = [lib1 lib2];
in config file
list off packages can be founded here

from gitnuro.

julius-boettger avatar julius-boettger commented on May 27, 2024

If this guide correct, to add dependency you just need to specify libraries with buildInputs = [lib1 lib2];

It's true that you can specify dependencies with buildInputs, but nativeBuildInputs also exists, as well as a few more options. I don't quite understand the difference myself, see more here.

list off packages can be founded here

I'm pretty sure the package in question is just libGL, but as mentioned in an earlier comment, I will also try out libGLU and libglibutil just in case.

I will comment again after trying this out.

from gitnuro.

julius-boettger avatar julius-boettger commented on May 27, 2024

I tried adding

buildInputs = [ libGL libGLU libglibutil ];
nativeBuildInputs = [ libGL libGLU libglibutil ];

to the build script I posted in an earlier comment (we call them "derivations" in nix-lingo). I also added them to my system packages to install them globally as well.

This sadly does not change anything, I still run into the same problem I opened this issue for.

from gitnuro.

JetpackDuba avatar JetpackDuba commented on May 27, 2024

I've spent a few more hours looking into it but no luck. Seems to be something related to how NixOS handles OpenGL: https://nixos.wiki/wiki/OpenGL

Flatpak includes all that stuff by itself so it's not needed in the host OS.

I don't think I can spend more time in this as it seems to be NixOS specific, I'd try asking for help in the Nix forums (or perhaps other communication tools such as discord or slack).

from gitnuro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.