-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tabby-terminal: init at 1.0.207 #303924
tabby-terminal: init at 1.0.207 #303924
Conversation
Please follow the standard commit & PR naming scheme of: So for example, Additionally, new packages should always follow the by-name convention, and so the Nix file containing the derivation for Tabby should be put in |
|
||
cat > $out/bin/tabby << END | ||
#!/bin/sh | ||
'$out/opt/Tabby/tabby' --no-sandbox $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should preferably be an explanation on what --no-sandbox does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idk what it does, but that's what the official Tabby deb has
Also, the name conflict between Tabby the... AI thing (?) and Tabby the terminal emulator definitely has to be resolved somehow. The terminal emulator is older but the AI program was added to nixpkgs earlier. I wonder if there's precedence to this? |
48bf745
to
5dcbea0
Compare
Idk what this package should be called since |
5dcbea0
to
40c439c
Compare
I guess |
40c439c
to
1122d68
Compare
I think this PR is ready |
a36f276
to
1b9eeda
Compare
waiting for pr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, though one day we should also add Darwin support I think
ln -s $out/opt/Tabby/tabby $out/bin/tabby | ||
|
||
substituteInPlace $out/share/applications/tabby.desktop \ | ||
--replace "/opt" $out/opt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful with absolute path in desktop entry. See #308324
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't seem to be fixed:
$ cat result/share/applications/tabby.desktop | grep Exec
Exec=/nix/store/5j7s1cl4y7f6v57iyd998rm1dg828hym-tabby-terminal-1.0.207/opt/Tabby/tabby --no-sandbox %U
postInstall = '' | ||
mkdir -p $out/{opt,bin} | ||
cp -r opt $out | ||
wrapProgram "$out/opt/Tabby/tabby" --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}} --no-sandbox" --set LD_LIBRARY_PATH=${lib.makeLibraryPath buildInputs} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrapProgram "$out/opt/Tabby/tabby" --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}} --no-sandbox" --set LD_LIBRARY_PATH=${lib.makeLibraryPath buildInputs} | |
wrapProgram "$out/opt/Tabby/tabby" --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}} --no-sandbox" |
Don't prioritize LD_LIBRARY_PATH. Try using autoPatchelfHook
instead. See https://nixos.org/manual/nixpkgs/unstable/#setup-hook-autopatchelfhook (You have to look carefully how buildInputs
works in this case, and use some runtimeDependencies
if that doesn't work)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this:
{
stdenv,
fetchurl,
pkgs,
lib,
alsa-lib,
}:
stdenv.mkDerivation rec {
name = "tabby-terminal";
version = "1.0.207";
src = fetchurl {
url = "https://github.com/Eugeny/tabby/releases/download/v${version}/tabby-${version}-linux-x64.deb";
hash = "sha256-PTTkL3+mYb7KM8fDUmgCuAF2lU88fYOstGWp/O5WZas=";
};
nativeBuildInputs = with pkgs; [
dpkg
autoPatchelfHook
];
buildInputs = with pkgs; [
glib
nss
nspr
atk
cups
dbus
libdrm
gtk3
pango
cairo
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
libxkbcommon
mesa
expat
xorg.libxcb
alsa-lib
libGL
libsecret
musl
];
runtimeDependencies = buildInputs;
postInstall = ''
mkdir -p $out/{opt,bin}
cp -r opt $out
# wrapProgram "$out/opt/Tabby/tabby" --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}} --no-sandbox"
cp -r usr/* $out
mv $out/opt/Tabby/tabby $out/bin/tabby
substituteInPlace $out/share/applications/tabby.desktop \
--replace "/opt/Tabby/tabby" tabby
'';
meta = with lib; {
homepage = "https://tabby.sh";
description = "A terminal for a more modern age";
license = licenses.mit;
maintainers = with maintainers; [ ChocolateLoverRaj ];
mainProgram = "tabby";
platforms = platforms.linux;
downloadPage = "https://github.com/Eugeny/tabby/releases/latest";
};
}
When I run it I get this error:
[rajas@nixos:~/Documents/nixpkgs]$ ./result/bin/tabby
[0516/104608.334415:ERROR:icu_util.cc(240)] Invalid file descriptor to ICU data received.
Trace/breakpoint trap (core dumped)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe ico is missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SuperSandro2000 should I try adding xorg.ico
?
74e3bdb
to
82fea25
Compare
postInstall = '' | ||
mkdir -p $out/{opt,bin} | ||
cp -r opt $out | ||
wrapProgram "$out/opt/Tabby/tabby" --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}} --no-sandbox" --set LD_LIBRARY_PATH=${lib.makeLibraryPath buildInputs} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe ico is missing?
@@ -0,0 +1,64 @@ | |||
{ stdenv, fetchurl, pkgs, lib, alsa-lib }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ stdenv, fetchurl, pkgs, lib, alsa-lib }: | |
{ stdenv, fetchurl, lib, alsa-lib }: |
Definitely don't pass pkgs
in; pass in the dependencies individually.
|
||
stdenv.mkDerivation rec { | ||
pname = "tabby-terminal"; | ||
version = "1.0.207"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nonblocking - but fyi, 1.0.208 is out
Besides the feedback above, this doesn't run as-is:
|
I'm stopping my work on this PR because I'm no longer interested in using Tabby. I've been using Konsole and I'm planning on switching to COSMIC Term when it's ready. I don't want to put more time into this, but if anyone else wants to, feel free to continue working on this PR. I'm not sure if I should close this PR since I won't be adding any more commits to it. |
Closing would make sense if you have no intention to work on it further. |
Hopefully this PR will help whoever wants to make another PR for Tabby package |
Description of changes
Added a package for Tabby. I'm new to creating Nix packages so there is probably a lot of room for improvement of the
default.nix
file I created. I tested it by adding(callPackage /home/rajas/Documents/nixpkgs/pkgs/applications/terminal-emulators/tabby { })
to my system packages in NixOS config file. Closes #233509.Things that are missing:
LD_LIBRARY_PATH
paths instead of overriding it, but I'm not sure howAlso the name conflicts with
tabby
fromunstable
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.