Skip to content
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

Packaging cope #30824

Closed
wants to merge 1 commit into from
Closed

Packaging cope #30824

wants to merge 1 commit into from

Conversation

fdietze
Copy link
Contributor

@fdietze fdietze commented Oct 26, 2017

Motivation for this change

I'm trying to package cope, a colourful wrapper for terminal programs. (This is my first time packaging something)

I added the IOStty perl dependency, but it is not found in the tests. What am I doing wrong?

building path(s) ‘/nix/store/858bnxnzn1dq76bkg5m0kc9ipqn5klwg-perl-cope-devdoc’, ‘/nix/store/yii3zklcrlwkcjppmiy8zziyxn5i27na-perl-cope’
unpacking sources
unpacking source archive /nix/store/mql2nsdzbq71y6429vrz5vy6sr8biiql-cope-0dc82a939a9498ff80caf472841c279dfe03efae-src
source root is cope-0dc82a939a9498ff80caf472841c279dfe03efae-src
patching sources
configuring
patching ./t/20-scripts.t...
patching ./t/12-buffering.t...
patching ./t/11-cope.t...
patching ./t/10-get.t...
patching ./t/00-load.t...
patching ./scripts/xrandr...
patching ./scripts/who...
...
patching ./install.sh...
patching ./depends.sh...
patching ./cope_path.pl...
patching ./config.sh...
patching ./build.sh...
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
[Core Features]
- Test::More          ...loaded. (1.001014)
- ExtUtils::MakeMaker ...loaded. (7.1002 >= 6.11)
- Env::Path           ...loaded. (0.19)
- File::ShareDir      ...loaded. (1.03)
- IO::Handle          ...loaded. (1.36)
- IO::Pty             ...loaded. (1.12)
- IO::Stty            ...missing.
- List::MoreUtils     ...loaded. (0.413)
- Regexp::Common      ...loaded. (2013031301)
- Term::ANSIColor     ...loaded. (4.04)
- Regexp::IPv6        ...loaded. (0.03)
*** Module::AutoInstall configuration finished.
Warning: prerequisite IO::Stty 0 not found.
Generating a Unix-style Makefile
Writing Makefile for Cope
Writing MYMETA.yml and MYMETA.json
no configure script, doing nothing
building
build flags: SHELL=/nix/store/h404wfcz8rzzlq8vr4z7plcijwzfci72-bash-4.4-p12/bin/bash
Installing blib/lib/auto/share/dist/Cope/acpi
Installing blib/lib/auto/share/dist/Cope/aptitude
...
Installing blib/lib/auto/share/dist/Cope/wget
Installing blib/lib/auto/share/dist/Cope/who
Installing blib/lib/auto/share/dist/Cope/xrandr
cp lib/App/Cope/Manual.pod blib/lib/App/Cope/Manual.pod
cp lib/App/Cope/Pty.pm blib/lib/App/Cope/Pty.pm
cp lib/App/Cope.pm blib/lib/App/Cope.pm
cp lib/App/Cope/Extra.pm blib/lib/App/Cope/Extra.pm
cp cope_path.pl blib/lib/cope_path.pl
Manifying 4 pod documents
running tests
check flags: SHELL=/nix/store/h404wfcz8rzzlq8vr4z7plcijwzfci72-bash-4.4-p12/bin/bash VERBOSE=y test
PERL_DL_NONLAZY=1 "/nix/store/raylbbdkg4yz21c44fwcv63bzvj7a1i1-perl-5.24.2/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/00-load.t t/10-get.t t/11-cope.t t/12-buffering.t t/20-scripts.t
# Testing App::Cope 0.99, Perl 5.024002, /nix/store/raylbbdkg4yz21c44fwcv63bzvj7a1i1-perl-5.24.2/bin/perl
t/00-load.t ....... ok
t/10-get.t ........ ok
t/11-cope.t ....... ok
Undefined subroutine &IO::Stty::stty called at /tmp/nix-build-perl-cope.drv-0/cope-0dc82a939a9498ff80caf472841c279dfe03efae-src/blib/lib/App/Cope/Pty.pm line 76.

#   Failed test at t/12-buffering.t line 48.
#          got: ''
#     expected: 'Opening--Closing
# '
Undefined subroutine &IO::Stty::stty called at /tmp/nix-build-perl-cope.drv-0/cope-0dc82a939a9498ff80caf472841c279dfe03efae-src/blib/lib/App/Cope/Pty.pm line 76.

#   Failed test at t/12-buffering.t line 48.
#          got: ''
#     expected: 'Opening--Closing
# '
# Looks like you failed 2 tests of 2.
t/12-buffering.t .. 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/2 subtests 
t/20-scripts.t .... ok

Test Summary Report
-------------------
t/12-buffering.t (Wstat: 512 Tests: 2 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
Files=5, Tests=89,  3 wallclock secs ( 0.05 usr  0.00 sys +  2.36 cusr  0.58 csys =  2.99 CPU)
Result: FAIL
Failed 1/5 test programs. 2/89 subtests failed.
make: *** [Makefile:796: test_dynamic] Error 255
builder for ‘/nix/store/r8343sddlnpi0ymgw7k6vfkiwl0pi4z6-perl-cope.drv’ failed with exit code 2
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@FRidh
Copy link
Member

FRidh commented Oct 28, 2017

I am not familiar with the Perl tooling, but maybe you have to set

PERL5LIB = with perlPackages; stdenv.lib.makePerlPath [EnvPath FileShareDir IOTty IOStty ListMoreUtils RegexpCommon RegexpIPv6 perl ];

Does the program need Perl during runtime with these tools? In that case it may need some patching or wrapping.

@c0bw3b
Copy link
Contributor

c0bw3b commented May 18, 2019

Stalled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants