msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.24k stars 1.21k forks source link

Add mingw-w64-lazygit #21303

Open Kreijstal opened 2 months ago

Kreijstal commented 2 months ago

Package name

lazygit

Brief description of package

I tried it compiling it with go, but it seems there are issues with msys2 path transformation, lazygit is really useful for working with git

lazygit
2024/07/03 09:34:13 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues

*fs.PathError chdir /home/user/lazygit: Das System kann den angegebenen Pfad nicht finden.

I would not say this is a lazygit bug but more like a msys2 package path transformation bug, no?

URL for package's homepage

https://github.com/jesseduffield/lazygit

Provide a basic test case to validate the package's functionality.

lazygit -v

MINGW environments where you need the package

Are you willing to submit a PR?

No response

revelator commented 2 months ago

might need pathtools so yes seems like a path transformation error ?.

emmanuelvende commented 1 week ago

I have the same error with the precompiled lazygit release for Windows I wanted to use in my msys2 environment. I've found a workaround ; it seems that lazygit on msys2 needs the git.exe issued from https://git-scm.com/download/win which is a "native win64" binary. So I uninstalled the msys2 git packages I had previously installed in msys2 through pacman (pacman -R git) and then I "installed" (copied-pasted) a portable version of git for windows (issued from the same downloading url above). I added the portableGit-usr-bin path to my msys2 bash path in .bashrc and voilà everything works fine. I can type giton command line it starts the portableGit version and lazygitbinary for windows works fine in the msys2 console as well

Kreijstal commented 1 week ago

That's a msys2 git bug no?

Kreijstal commented 1 week ago

Or can we package mingw-w64-git then?

emmanuelvende commented 1 week ago

Indeed I think that's a msys2 git package problem. lazygit works with the git.exe provided by https://git-scm.com/download/win but not with the msys2 current package provided when executing pacman -S git in the msys2 shell (https://packages.msys2.org/package/git)

Kreijstal commented 1 week ago

Indeed I think that's a msys2 git package problem. lazygit works with the git.exe provided by https://git-scm.com/download/win but not with the msys2 current package provided when executing pacman -S git in the msys2 shell (https://packages.msys2.org/package/git)

makes sense, shame there isn't go for cygwin then

emmanuelvende commented 1 week ago

I think that a definitive way to solve any related issues would be to integrate in msys2 the official packages of git-for-windows instead of providing the msys2-git-package. The topic is evoked in the faq of the msys2 git package ; note that a guide is provided there to install the git-for-windows official build in msys2 but as it can heavily change the current msys2 configuration I have I don't want to try. At the moment I use the solution I mentioned above, but I have also to maintain a manual mirroring of .ssh/ folder and .gitconfig between C:\msys64\home\username and C:\Users\myusername folders in Windows. I could have configured msys2 to use C:\Users\myusername as my home directory but it would lead maybe to other side effects so I prefer keep the orignal config of msys2 and perform manual sync of these folders by hand (ie every time I change a global git config setting or I add or delete a ssh key)

rimrul commented 1 week ago

Or can we package mingw-w64-git then?

16383

Kreijstal commented 1 week ago

Or can we package mingw-w64-git then?

16383

alternatively try to compile go on msys