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
scrcpy: init at v1.2 #44249
scrcpy: init at v1.2 #44249
Conversation
@GrahamcOfBorg build scrcpy |
this is a different attempt to package it, but the build currently fails: #44101 |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: scrcpy Partial log (click to expand)
|
@DeltaEvo are you also interested in adding yourself as a maintainer to the package? More maintainers are welcome. |
Success on x86_64-darwin (full log) Attempted: scrcpy Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: scrcpy Partial log (click to expand)
|
pkgs/misc/scrcpy/default.nix
Outdated
, pkgconfig | ||
|
||
, androidsdk | ||
, ffmpeg |
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.
ffmpeg is not needed i think, only libav is used
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 libav
not just a ffmpeg
fork?
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.
Ah yes your right 😂 https://github.com/haasn/mpvhq-old/wiki/FFmpeg-versus-Libav
|
||
# Manually install the server jar to prevent Meson from "fixing" it | ||
preConfigure = '' | ||
echo -n > server/meson.build |
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.
Why don't use -Dprebuilt_server
option ?
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 manually install it to work around the weird elf error from Meson. I don't really have experience with meson and couldn't find a way to exclude the file from the depfixer.py invocation.
depfixer has a fix_jar
function, but due to a bug (???) it calls fix_rpath instead.
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 seen the same issue. The prebuild server should be fine.
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.
This is very strange, I didn't have this issue when i was creating the package because I was at an old version of nixpkgs, I think this is the new version of meson mesonbuild/meson@c70a051 Perhaps this commit
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.
Aw yes it's this commit, meson try to rewrite the jar to rewrite the Manifest inside
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.
Hmm so the version in nixpkgs (0.46.1) doesn't have fix_jar. Updating meson to 0.47.1 may fix it
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.
Aw we we are not at 0.47.1 🤔, even if we update I think we still will have issues because with 0.47.1 it will try to rewrite the jarfile, and fail like fix_rpath
because the file is not writtable
pkgs/misc/scrcpy/default.nix
Outdated
mkdir -p "$out/share/scrcpy" | ||
ln -s "${prebuilt_server}" "$out/share/scrcpy/scrcpy-server.jar" | ||
|
||
wrapProgram "$out/bin/scrcpy" --prefix PATH : "${androidsdk}/bin" |
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.
Android sdk was not needed at runtime for me 🤔
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 think adb
was used if I remember correctly.
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.
https://github.com/Genymobile/scrcpy#requirements
It adb push
es the server jar to the device at runtime
There may be a smaller nixpkgs package which just has adb though
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.
Yes it's in the platform tools, so androidenv.platformTools
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.
correct. androidenv.platformTools
should be enough
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.
awesome! changed
@Mic92 I'm not against it |
@DeltaEvo I'll add you! Sorry I didn't see your pr else I would have submitted a patch. |
|
Motivation for this change
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)