-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
tabby-terminal: init at 1.0.207 #303924
base: master
Are you sure you want to change the base?
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
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?
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.