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
WIP emby: 3.5.2.0 -> 3.5.3.0 and migration from mono to dotnet #47659
Conversation
e6ae3ba
to
2d9342e
Compare
2d9342e
to
6e8da1d
Compare
pkgs/servers/emby/default.nix
Outdated
mkdir -p "$out/bin" | ||
cp -r * "$out/bin" | ||
install -dm 755 "$out/usr/lib/emby-server" | ||
cp -r * "$out/usr/lib/emby-server" |
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 suspect this will copy env-vars
file to the destination directory, which can contain references to other packages not needed at runtime, similar to #47269
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.
What do you suggest would be appropriate?
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.
In the linked issue, I have changed the unpacking phase to create the expected source directory
unpackPhase = ''
mkdir src
cd src
tar xvzf $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.
I can't figure out what shouldn't be copied. By inspecting the result simlink it seems that only needed files are here.
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 have tested the build and there are no unwanted files in the result directory.
It seams I have misunderstood the origin of the problem in the other issue:
I assumed that the env-vars file is created as part of the setup for every build, but it is not. Also it seams to be not required, that an archive contains a directory for the files first. I will have to look at why it is again.
So I am sorry for adding this confusion.
Edit: 🤦♂️ Found my stupid mistake: The new zip file is organized in the expected manner. There is only one subdirectory named system
, so everything works out.
@baracoder I tried to use coreclr, but corerun doesn't seems to be a drop in replacement of the dotnet executable. |
pkgs/servers/emby/default.nix
Outdated
|
||
makeWrapper "${mono54}/bin/mono" $out/bin/MediaBrowser.Server.Mono \ | ||
--add-flags "$out/bin/MediaBrowser.Server.Mono.exe -ffmpeg ${ffmpeg}/bin/ffmpeg -ffprobe ${ffmpeg}/bin/ffprobe" | ||
install -dm 755 "$out/usr/lib/emby-server" |
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.
@nyanloutre This path shouldn't have usr/
in the nix store.
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.
Is /lib
the correct folder ? I putted it here because it mostly consisted of dll files, but maybe /opt
would be better ?
Execution of $out/bin/emby now fails with
|
@worldofpeace this is strange, do you have any idea why ? If I revert the commit 9ec17c6 it works again EDIT: Interestingly if I put the files in /opt it also work |
@nyanloutre Strange, yet if it works at "$out/opt" then it's good 👍 |
@GrahamcOfBorg build emby |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: emby Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: emby Partial log (click to expand)
|
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.
Thank you! Since errors of this kind
seem to be common, it would be nice to add some sort of automatic sanity testing in the future. Something like installCheckPhase = ''
$out/bin/emby -v | grep "${version}"
'' |
There should also be a patch to the Emby module because the binary name changed |
nixos/emby: fix use of outdated binary name changed by NixOS#47659
(cherry picked from commit bb06b5b)
Motivation for this change
Fixes #47658
This release is not available as a mono build, so I tried to make it work with dotnet
Current situation
By launching it manually it seems to be working as it is
Fixed
I didn't manage to make it work yet, if you have any suggestion please make a comment.
Execution of
bin/emby
for now:Previously this was fixed by editing the file
SQLitePCLRaw.provider.sqlite3.dll.config
, but it is not present anymore and creating it doesn't have any effects.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)