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
rapid-photo-downloader: init at 0.9.9 #36621
rapid-photo-downloader: init at 0.9.9 #36621
Conversation
|
||
postPatch = '' | ||
substituteInPlace pymediainfo/__init__.py \ | ||
--replace 'CDLL("libmediainfo.so.0")' 'CDLL("${libmediainfo}/lib/libmediainfo.so.0")' \ |
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.hostPlatform.extensions.sharedLibrary}
instead of .so
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.
Done. I've also replaced the library references for Darwin.
ba7c6b1
to
654076a
Compare
|
||
buildInputs = [ | ||
gobjectIntrospection | ||
(libgudev.overrideAttrs (oldAttrs: rec { |
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.
Can you add a comment explaining why this is needed?
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.
Sure, no problem.
}: | ||
|
||
python3Packages.buildPythonApplication rec { | ||
name = "rapid-photo-downloader-${version}"; |
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.
The name
attribute is added by buildPython*
and should therefore be removed. Instead, use
pname = "rapid-photo-downloader";
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, forget to do it for the main package as well. This detail could use some documentation in the Nixpkgs manual.
e1f03e6
to
d2a3621
Compare
nativeBuildInputs = [ file intltool ]; | ||
|
||
buildInputs = [ | ||
gobjectIntrospection |
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.
Shouldn't this go into nativeBuildInputs
?
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, you are right.
@GrahamcOfBorg build python2.pkgs.pymediainfo python3.pkgs.pymediainfo python2.pkgs.pyprind python3.pkgs.pyprind python2.pkgs.rawkit python3.pkgs.rawkit python2.pkgs.gphoto2 python3.pkgs.gphoto2 |
Success on x86_64-linux (full log) Attempted: python2.pkgs.pymediainfo, python3.pkgs.pymediainfo, python2.pkgs.pyprind, python3.pkgs.pyprind, python2.pkgs.rawkit, python3.pkgs.rawkit, python2.pkgs.gphoto2, python3.pkgs.gphoto2 Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python2.pkgs.pymediainfo, python3.pkgs.pymediainfo, python2.pkgs.pyprind, python3.pkgs.pyprind, python2.pkgs.rawkit, python3.pkgs.rawkit, python2.pkgs.gphoto2, python3.pkgs.gphoto2 Partial log (click to expand)
|
d2a3621
to
14012bc
Compare
'CDLL("${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}.0")' | ||
''; | ||
|
||
buildInputs = [ libmediainfo glibcLocales ]; |
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.
libmediainfo
should not be necessary here because it is referenced in postPatch
. glibcLocales
can go into checkInputs
.
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.
Done. The latter should also be corrected in the Nixpkgs Manual if I am not mistaken.
14012bc
to
2ffeb20
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.
If you know how to run the tests in https://bazaar.launchpad.net/~dlynch3/rapid/zeromq_pyqt/files/head:/raphodo/tests/, that would be nice to have in checkPhase
. But overall, seems fine.
--replace 'CDLL("libmediainfo.dylib")' \ | ||
'CDLL("${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}")' \ | ||
--replace 'CDLL("libmediainfo.so.0")' \ | ||
'CDLL("${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}.0")' |
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 .0
necessary?
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.
AFAIK this indicates the version number of the library which will be incremented on breaking changes. Thus I assume that this makes a difference.
|
||
makeWrapperArgs = [ | ||
"--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" | ||
"--set PYTHONPATH \"$PYTHONPATH\"" |
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 will add build-time dependencies as run-time dependencies. Is the default wrapper not sufficient?
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 was the only way I was able to make it 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.
Makes sense, because the Python packages you've added are not included in propagatedBuildInputs
. We use that attribute also for indicating they're run-time dependencies.
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've tried that before but then some modules like zmq
cannot be found.
@dotlambda, seeing as the tests are not included in the tarball, I believe those are not intended to be used downstream. |
@jfrankenau in my experience the average maintainer does not consider downstream distributors at all, so I would not dare making that assumption. Instead, I would say that, if upstream maintainers believe downstream distributors should not use their tests, that we should not package the software because of potential low quality. |
2ffeb20
to
e6f61bb
Compare
So, I've had a look at the tests and they seem to be outdated or need to be run interactively with some test data. I will see if I can get upstream to update those tests. |
@FRidh, so according to upstream the tests are not automated:
I've been using this PR without any problems so far and would be happy to see this merged. The override for |
@FRidh: It seems all your comments have been adressed. I'm merging. |
pymediainfo was broken by #46255 |
Motivation for this change
Rapid Photo Downloader is a quick and simple to use photo importer.
Things done
Add a few python packages needed for
rapid-photo-downloader
.Currently,
libgudev
is manually overridden forrapid-photo-downloader
to be built withgobjectIntrospection
. It's probably better to wait for #35335 to be merged.build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)