-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
dorion: 5.0.1 → 6.2.0; dorion: build from source #265771
base: master
Are you sure you want to change the base?
Conversation
25a8866
to
3054e22
Compare
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.
Impressive! Considering SpikeHD/Dorion#125 is a thing, I consider this PR a ZHF fix. #265948
Runs fine, but a bit more sluggish than the official client. Likely a tauri issue.
5c825e5
to
1fd5b9b
Compare
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.
Sorry for appearing nitpicky, you have done an excellent job. The proposed set of substitutions IMO clearly convey their intent
39c423b
to
0b33e13
Compare
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.
We seem to have a build failure, the proposed fix works on my end
More build failures: |
pain |
a1ed935
to
68a67f3
Compare
05ff166
to
3390773
Compare
Do you know how to fix that, can't really debug (or fix it rn) so would appreciate it if you could :3 |
Where would I need to add these two lines? 😅 |
|
Dorion updated a few times since this PR was made. Its latest version is v6.1.0 and it has also started using Tauri v2 (since v6.0.0), which lets it take advantage of Also, would it be possible to override Dorion's |
ba533da
to
076a860
Compare
There is a permission error now that I can't seem to solve if anyone wants to chip in :P |
f3d7371
to
a78c369
Compare
d2d073d
to
053b2e3
Compare
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.
TL;DR: Try moving this to cargo-tauri.hook. It should make some things here much easier
pkgs/by-name/do/dorion/package.nix
Outdated
libappindicator | ||
libayatana-appindicator | ||
]; | ||
frontend = stdenv.mkDerivation { |
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 wouldn't recommend splitting this derivation. In most cases, it's much easier to pull pnpmDeps, pnpm.configHook, etc., into the main derivation and let cargo-tauri build as intended. You can see an example of this in the test app
pkgs/by-name/do/dorion/package.nix
Outdated
runtimeDependencies = [ | ||
libappindicator | ||
libayatana-appindicator | ||
]; |
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.
Tauri apps will only use one or the other, so there's no need to have both of these. I believe the upstream recommendation is libayatana-appindicator
We also shouldn't be using patchelf
here at all as we are compiling from source. Instead, we can patch the crate to use the proper path like this
pkgs/by-name/do/dorion/package.nix
Outdated
.build.beforeBuildCommand = "" | | ||
.build.frontendDist = "src" | |
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.
.build.beforeBuildCommand = "" | | |
.build.frontendDist = "src" | |
These should be able to be removed when using cargo-tauri.hook
pkgs/by-name/do/dorion/package.nix
Outdated
postInstall = '' | ||
mkdir -p $out/lib/dorion | ||
cp -r {injection,html} $out/lib/dorion | ||
install -Dm644 "$out/share/icons/hicolor/32x32/apps/dorion.png" "./${src.name}/src-tauri/icons/32x32icon.png" | ||
install -Dm644 "$out/share/icons/hicolor/128x128/apps/dorion.png" "./${src.name}/src-tauri/icons/128x128.png" | ||
install -Dm644 "$out/share/icons/hicolor/256x256/apps/dorion.png" "./${src.name}/src-tauri/icons/[email protected]" | ||
install -Dm644 "$out/share/icons/hicolor/512x512/apps/dorion.png" "./${src.name}/src-tauri/icons/icon.png" |
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.
ditto
pkgs/by-name/do/dorion/package.nix
Outdated
desktopItems = [ | ||
(makeDesktopItem { | ||
name = "dorion"; | ||
genericName = "Internet Messenger"; | ||
desktopName = "Dorion"; | ||
exec = "dorion %U"; | ||
tryExec = "dorion %U"; | ||
icon = "dorion"; | ||
comment = "Tiny alternative Discord client"; | ||
keywords = [ | ||
"discord" | ||
"vencord" | ||
"tauri" | ||
"chat" | ||
]; | ||
categories = [ | ||
"Network" | ||
"InstantMessaging" | ||
"Chat" | ||
]; | ||
mimeTypes = [ "x-scheme-handler/discord" ]; | ||
startupWMClass = "Dorion"; | ||
terminal = false; | ||
}) | ||
]; |
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.
ditto -- though, you may still want to final one as Tauri's generated .desktop files may be lacking in metainfo. See
nixpkgs/pkgs/by-name/mo/modrinth-app-unwrapped/package.nix
Lines 75 to 89 in cd43d68
postInstall = | |
lib.optionalString stdenv.hostPlatform.isDarwin '' | |
mkdir -p "$out"/bin | |
mv "$out"/Applications/Modrinth\ App.app/Contents/MacOS/Modrinth\ App "$out"/bin/modrinth-app | |
ln -s "$out"/bin/modrinth-app "$out"/Applications/Modrinth\ App.app/Contents/MacOS/Modrinth\ App | |
'' | |
+ lib.optionalString stdenv.hostPlatform.isLinux '' | |
desktop-file-edit \ | |
--set-comment "Modrinth's game launcher" \ | |
--set-key="StartupNotify" --set-value="true" \ | |
--set-key="Categories" --set-value="Game;ActionGame;AdventureGame;Simulation;" \ | |
--set-key="Keywords" --set-value="game;minecraft;mc;" \ | |
--set-key="StartupWMClass" --set-value="ModrinthApp" \ | |
$out/share/applications/modrinth-app.desktop | |
''; |
I thought that supported only Tauri v1? Dorion is using Tauri v2 currently. EDIT: Nvm, saw V2 support got merged recently. |
Co-authored-by: griffi-gh <[email protected]>
Def doing something wrong, but what me and @griffi-gh has so far :3 |
runtimeDependencies = [ | ||
libayatana-appindicator | ||
]; |
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.
runtimeDependencies = [ | |
libayatana-appindicator | |
]; |
gst_all_1.gst-plugins-bad | ||
gst_all_1.gst-plugins-base | ||
gst_all_1.gst-plugins-good | ||
webkitgtk_4_0 | ||
glib-networking | ||
libayatana-appindicator |
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.
libayatana-appindicator |
]; | ||
|
||
buildInputs = [ | ||
glib-networking | ||
openssl | ||
webkitgtk_4_1 |
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.
Some of these dependencies should be optional if this app supports both Linux and Darwin
wrapGAppsHook3 | ||
yq-go | ||
desktop-file-utils | ||
copyDesktopItems |
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.
copyDesktopItems |
No longer needed since we're editing the generated file
maintainers = with lib.maintainers; [ | ||
nyabinary | ||
aleksana | ||
griffi-gh |
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.
griffi-gh | |
griffi-gh | |
getchoo |
Feel free to add me as well. I like this as an edge case for cargo-tauri.hook
Description of changes
Build from source
Tauri patched to remove its hard-coded resource directory
Enable WebkitGTK Experimental toggle for WebRTC (To make VCs work)
Added myself to maintainer
Depends on #280554
Obligatory: #327063
Closes #360644
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/
)Huge thanks to @lilyinstarlight this PR wouldn't be possible without her.