perlPackages: init 3 perl packages#135667
Conversation
|
The BarcodeZBar module is sourced through the zbar pkg in nixpkgs but when building errors with:
Contrary to this log it isnt harmless at all. Not sure why Processor.t requires network access |
93cbb05 to
6c4f8e1
Compare
pkgs/top-level/perl-packages.nix
Outdated
There was a problem hiding this comment.
What's the difference with https://metacpan.org/release/SPADIX/Barcode-ZBar-0.04 ? Some glance at https://github.com/mchehab/zbar/commits/master/perl tells me there's substantial changes, but users may be confused as to the provenance of this module.
Might be worth convincing upstream to push a new version to CPAN.
There was a problem hiding this comment.
The metacpan module was last updated in 2009 and uses a zbar version from that time (before it was forked onto github).
The changes in the github repo are to update the module so that it works with the current version.
Unfortunately it doesn't seem like the cpan maintainer is around anymore, not sure how cpan modules work exactly but could the current maintainer of zbar take ownership of that? Or would it be better to suggest that he makes a new cpan module (similar to graphviz and graphviz2)?
There was a problem hiding this comment.
Yes, there is a process for adopting CPAN modules outlined in http://neilb.org/2013/07/24/adopt-a-module.html that upstream can do - I'd be happy to lend a hand and talk to the CPAN admins if needed 💪
It is also possible to make a new Barcode::ZBar2 dist like what GraphViz did - the namespace changes will be necessary due to how CPAN arranges ownership of namespaces, if not taking the adoption route.
There was a problem hiding this comment.
So Barcode-ZBar 0.04 on CPAN is not the same as ${zbar.src}/perl ?
NetServerSSPrefork was a similar case where the we went for an updated version from the authors repo, instead of the latest on CPAN. I suggest marking the version like "0.04pre" or "unstable-YYYY-MM-DD" if the CPAN version can't be used.
There was a problem hiding this comment.
That is correct the zbar.src is different from the CPAN version. The Perl module was forked at the same time that the main project was and has been updated since to maintain compatability.
There was a problem hiding this comment.
Works for me.
Can you add a short comment describing the reason for it?
Also, I'd prefer setting something like version = "0.04pre" since it kinda matches $Barcode::ZBar::VERSION - if that's ok.
There was a problem hiding this comment.
Sure ill do that now
There was a problem hiding this comment.
Just a little nitpick: Can you move the comment to i.e. above the src attribute, so it is more clear that it belongs to this derivation? :)
There was a problem hiding this comment.
Any idea why the tests are failing? Its building on my machine with
nix build .#perlPackages.BarcodeZBar
There was a problem hiding this comment.
The packages build fine for me too, however the basic evaluation checks fail with:
...
2021-08-25T14:05:55.8834116Z checking Nixpkgs on aarch64-darwin
2021-08-25T14:06:35.4812678Z error: while querying the derivation named 'perl5.32.1-Barcode-ZBar-0.04pre':
2021-08-25T14:06:35.4815914Z while evaluating the attribute '__impureHostDeps' of the derivation 'perl5.32.1-Barcode-ZBar-0.04pre' at /nix/store/jzigajkia0hjyjq1xakyfkcpisxqfdfm-source/pkgs/stdenv/generic/make-derivation.nix:205:7:
2021-08-25T14:06:35.4829281Z while evaluating anonymous function at /nix/store/jzigajkia0hjyjq1xakyfkcpisxqfdfm-source/pkgs/stdenv/generic/make-derivation.nix:188:32, called from /nix/store/jzigajkia0hjyjq1xakyfkcpisxqfdfm-source/pkgs/stdenv/generic/make-derivation.nix:188:17:
2021-08-25T14:06:35.4832733Z while evaluating 'chooseDevOutputs' at /nix/store/jzigajkia0hjyjq1xakyfkcpisxqfdfm-source/lib/attrsets.nix:500:22, called from undefined position:
2021-08-25T14:06:35.4835556Z undefined variable 'TestMore' at /nix/store/jzigajkia0hjyjq1xakyfkcpisxqfdfm-source/pkgs/top-level/perl-packages.nix:1234:20
2021-08-25T14:06:35.5536880Z builder for '/nix/store/6cy9172l569fpkylir23939kianysr7j-nixpkgs-release-checks.drv' failed with exit code 1
2021-08-25T14:06:35.5735589Z error: build of '/nix/store/6cy9172l569fpkylir23939kianysr7j-nixpkgs-release-checks.drv' failed
2021-08-25T14:06:35.5783136Z ##[error]Process completed with exit code 100.
https://github.com/NixOS/nixpkgs/pull/135667/checks?check_run_id=3422793076
I'm not sure why it fails, but could be an issue with the action or the platform it's running on. (TestMore correctly points to null as it's a part of core)
6c4f8e1 to
5f3b41e
Compare
48f00f7 to
6e48536
Compare
|
@GrahamcOfBorg build perlPackages.BarcodeZBar perlPackages.TestSnapshot perlPackages.DataSectionSimple |
|
@GrahamcOfBorg eval |
pkgs/top-level/perl-packages.nix
Outdated
There was a problem hiding this comment.
| buildInputs =[ TestMore ExtUtilsMakeMaker ]; | |
| buildInputs = [ TestMore ExtUtilsMakeMaker ]; |
TestMore does not exist. Do you mean TestSimple?
There was a problem hiding this comment.
@SuperSandro2000 TestMore is linked to null since it is in core. #135667 (comment)
(Not sure why the "Basic evaluation checks" test fail. Thought it might be related to aarch64-darwin?)
There was a problem hiding this comment.
Ah I think I see why now. It is failing on aarch64-darwin as the ZBar package where we are getting the src for the module is only packaged for x86_64-linux
There was a problem hiding this comment.
Might need something like
| buildInputs =[ TestMore ExtUtilsMakeMaker ]; | |
| buildInputs = [ TestMore ExtUtilsMakeMaker ]; | |
| perlPreHook = lib.optionalString stdenv.isDarwin "export LD=$CC"; |
There was a problem hiding this comment.
I've removed TestMore to side step confusion and added in the suggestion from @zakame and it now the Basic Evaluation Checks pass 🚀
What is happening here?
There was a problem hiding this comment.
Yeah, it has to do with the macOS xcode-tools ld not being picked up instead of the Nix-provided gcc (which can also do linking.) You can see this through calling nix log on the perl5XXPackages.BarcodeZBar derivation, or through ofborg, e.g.
cc -c -fno-common -DPERL_DARWIN -mmacosx-version-min=10.12 -fno-strict-aliasing -pipe -fstack-protector-strong -I/no-such-path/include -DPERL_USE_SAFE_PUTENV -Wno-error=implicit-function-declaration -O3 -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" "-I/nix/store/bbmc66vbfpyri3qink1mylhmk1h97a7n-perl-5.34.0/lib/perl5/5.34.0/darwin-thread-multi-2level/CORE" ZBar.c
rm -f blib/arch/auto/Barcode/ZBar/ZBar.bundle
LD_RUN_PATH="/nix/store/1iiggnhv90xja3n3j76bvvzy0h18dx46-zbar-0.23.90-lib/lib" cc -mmacosx-version-min=10.12 -bundle -undefined dynamic_lookup -L/no-such-path/lib -fstack-protector-strong ZBar.o -o blib/arch/auto/Barcode/ZBar/ZBar.bundle \
-L/nix/store/1iiggnhv90xja3n3j76bvvzy0h18dx46-zbar-0.23.90-lib/lib -lzbar \
6e48536 to
e21c64b
Compare
|
@GrahamcOfBorg build perlPackages.BarcodeZBar perlPackages.TestSnapshot perlPackages.DataSectionSimple |
Motivation for this change
Dependencies for ngi-nix project
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)