loading...

Hacktoberfest 2020 report

zakame profile image Zak B. Elep ・4 min read

FPBP!

So, I'm rather new here at dev.to and since Hacktoberfest 2020 has come and gone, I might as well get started doing a new blog here. I've been doing Hacktoberfests for maybe a couple of years now, and while this year has seen quite the kerfuffle, that alone should not be enough reason to stop doing it.

Background

I work primarily with #perl stuff with bits of #docker and other tools in between, so most of my previous Hacktoberfests have focused on contributing to these. For this year though, I wanted to learn and use #nix some more, especially as I found the idea of reproducible developer environments across different machines to be interesting, and I've tried doing similar things (to mixed results) with Docker.

To help both Nix and Perl efforts, I thought learning enough of Nixpkgs to port missing CPAN modules I want or need would be a good idea to start...

Contributions

The Hacktoberfest game approved these PRs:

Add --dry-run completion to nix-build and nix-shell #37

nix-build explicitly documents --dry-run in its --help, while nix-shell passes it onto nix-store --realise.


This got me started as I'm using zsh as my default shell, but the Nix tooling uses bash. Having become an avid user of nix-shell, I used the --dry-run flag (which it passes down to nix-store --realise) for estimating download sizes of stuff I want in the shell. Since this particular flag was missing in the completion, it seemed easy enough to add it in with this PR, despite some other note about changing the implementation entirely for the new nix command interface.

perlPackages.FutureAsyncAwait: init at 0.44 #100652

Motivation for this change

This adds async/await keywords to Perl to enhance the use of Future-using code.

This also adds XS::Parse::Sublike as a dependency of this package.

Things done
  • [x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • [x] NixOS
    • [ ] macOS
    • [x] 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 nixpkgs-review --run "nixpkgs-review wip"
  • [ ] Tested execution of all binary files (usually in ./result/bin/)
  • [ ] Determined the impact on package closure size (by running nix path-info -S before and after)
  • [ ] Ensured that relevant documentation is up to date
  • [x] Fits CONTRIBUTING.md.

At my work, we're using Future::AsyncAwait heavily, so I missed this somewhat in Nixpkgs enough to get me started learning how to port it from CPAN to Nixpkgs. Porting is somewhat easy to do using nix-generate-from-cpan, but the other half of work is testing if it actually builds using nix-build to make additional changes if needed, and testing builds of other packages depending on it with nixpkgs-review preferably on both Nix-enhanced Linux installs as well as on native NixOS and macOS.

Thanks to stigtsp for showing me the ropes!

perlPackages.IOAsyncSSL: init at 0.22 #100820

Motivation for this change

This pure-Perl addon for IO::Async extends it to allow creating TLS/SSL servers or clients via IO::Socket::SSL.

This is a somewhat required module for other IO::Async-based code that connect/serve TLS/SSL resources, such as those in the Net::Async namespace.

Things done
  • [x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • [x] NixOS
    • [ ] macOS
    • [X] 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 nixpkgs-review --run "nixpkgs-review wip"
  • [ ] Tested execution of all binary files (usually in ./result/bin/)
  • [ ] Determined the impact on package closure size (by running nix path-info -S before and after)
  • [ ] Ensured that relevant documentation is up to date
  • [X] Fits CONTRIBUTING.md.

Pretty much anything external that one can substantially reach with IO::Async needs TLS/SSL, so missing this in Nixpkgs seems odd. Adding it here seems a no-brainer, and would help in upcoming packages like Net::Async::HTTP and Net::Async::WebSocket (with the latter having pretty much a hard dependency for IO::Async::SSL anyway for working on anything non-trivial.)

Convert t/mojolicious/exception_lite_app.t to use subtests #1579

Summary

As the title says.

Motivation

I was already in the area for #1578 so might as well convert the test!

References

For #1520.

This was a PR derived from an earlier more substantial work which was merged later, beyond the Hacktoberfest cutoff:

Replace prettify.js with highlight.js #1578

Summary

This replaces the old prettify.js highlighter with highlight.js.

Motivation

prettify.js has long been abandoned by Google so we need to replace it.

That said, highlight.js is also somewhat dormant (https://github.com/highlightjs/highlight.js/issues/1678) but still sees enough activity to get around.

References

This is an update of #737, fixes #1544.

Most of the work was already done by @dotandimet, please give credit where due. I just updated it for latest Mojo and highlight.js 💪

I also made a few followup PRs to Nixpkgs that Hacktoberfest counted as bonus:

perlPackages.Future: 0.45 -> 0.46 #101118

Motivation for this change

https://metacpan.org/release/PEVANS/Future-0.46

Things done
  • [x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • [x] NixOS
    • [ ] macOS
    • [X] 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 nixpkgs-review --run "nixpkgs-review wip"
  • [ ] Tested execution of all binary files (usually in ./result/bin/)
  • [ ] Determined the impact on package closure size (by running nix path-info -S before and after)
  • [ ] Ensured that relevant documentation is up to date
  • [X] Fits CONTRIBUTING.md.

perlPackages.LinuxInotify2: add description/license to meta #101182

Motivation for this change

Applying my suggestion from https://github.com/NixOS/nixpkgs/pull/101122#discussion_r508457565 to update package meta/documentation. No functional changes.

Things done
  • [X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • [X] 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 nixpkgs-review --run "nixpkgs-review wip"
  • [ ] Tested execution of all binary files (usually in ./result/bin/)
  • [ ] Determined the impact on package closure size (by running nix path-info -S before and after)
  • [ ] Ensured that relevant documentation is up to date
  • [X] Fits CONTRIBUTING.md.

perlPackages.FutureAsyncAwait: 0.44 -> 0.45 #101402

Motivation for this change

https://metacpan.org/release/PEVANS/Future-AsyncAwait-0.45

Things done
  • [ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • [ ] NixOS
    • [ ] macOS
    • [X] 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 nixpkgs-review --run "nixpkgs-review wip"
  • [ ] Tested execution of all binary files (usually in ./result/bin/)
  • [ ] Determined the impact on package closure size (by running nix path-info -S before and after)
  • [ ] Ensured that relevant documentation is up to date
  • [X] Fits CONTRIBUTING.md.

There's also a few other PRs that didn't make the count, like the one for Mojo above, and these:

Replace prettify.js with highlight.js #22

Summary

This replaces the old prettify.js highlighter with highlight.js.

Motivation

prettify.js has long been abandoned by Google so we need to replace it.

References

https://github.com/mojolicious/mojo/issues/1544 https://github.com/mojolicious/mojo/pull/1578

This change is now live at both https://mojolicious.org and https://docs.mojolicious.org (though still keeping an eye on the highlightjs stuff, should they need more updating.)

nixGL.nix: Add libGLX_indirect.so.0 symlink for nixGLIntel #64

This aids discovery of GLX capabilities on Intel-based setups for e.g. glxinfo, alacritty, kitty.

Not sure if using runCommand here is the right way, let me know if this needs revising, but it seems to work well enough for me...

Ref #24

This one came about as I was looking to replace KDE4 Konsole on my Slackware 14.2 with a more modern terminal, and tried both Alacritty and Kitty. I eventually went with Kitty, but since this requires GPU acceleration I needed nixGL and Nixpkgs' own mesa_drivers as well.

perl: Add note about coexisting with Debian's /usr/bin/perl #1822

A few users of docker-perl have stumbled upon (and getting confused with) the default /usr/bin/perl shipped by Debian, so put a short note here explaining why it remains and also better describe how docker-perl and its tooling is installed/configured.

References:

This was a somewhat longstanding documentation issue on docker-perl (which I maintain for sometime now,) and since it was flaring up on and off again, might as well make the time to document this issue so people using the docker-perl image know what to expect.

Progress

I was able to do a good many more PRs this year than in previous years, but at the same time many of them weren't eligible for this time due to the changes in the Hacktoberfest game that supposedly ruined it for everyone. OTOH, I never really actively sought for the reward(s), but rather the experience of this yearly adventure to do a bit more for Free and Open Source Software than what I usually do regularly.

Another thing that tempers my expectation for rewards is that I'd have to go waiting a few more months to receive it, and go through post office procedures which take a good hour or two to complete, which in this pandemic clown world would be a risk I'd rather not take...

Reflections

Learning Nix and Nixpkgs through porting Perl modules to it was a great experience, and I hope to continue doing so beyond Hacktoberfest. I'm particularly interested in making a reproducible Perl development environment more easier to do in Nix, maybe with some insight with sister languages like Ruby Bundix or Python pynixify.

I'll also be continuing some docker-perl work, especially as frameworks like Mojolicious are keen to get onto the cloud-native bandwagon (if not so already) in order to do easy, reproducible app deployments to Docker or Kubernetes; Nix may help yet again with that too, as it already has the tooling for exporting to Docker or OCI image formats.

Discussion

pic
Editor guide
Collapse
ubuntunero profile image
Elmer Rivera

good stuff