I am not sure how to modify the python example i.e. which tarball to fetch for a start.
# shell.nix
let
# We pin to a specific nixpkgs commit for reproducibility.
# Last updated: 2024-04-29. Check for new commits at https://status.nixos.org.
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/cf8cc1201be8bc71b7cbbbdaf349b22f4f99c7ae.tar.gz") {};
in pkgs.mkShell {
packages = [
(pkgs.python3.withPackages (python-pkgs: with python-pkgs; [
# select Python packages here
pandas
requests
]))
];
}
As described here GitHub · Where software is builtzef install Chart::Gnuplot falls over and I do not know how to expedite fixing it, as it is supposed to work in Ubuntu.
I just took a look, and it seems as if the Chart::Gnuplot package has native dependencies, and a really messy/stupid config phase… It spits out errors and warnings about missing libs, and instead of giving you a reasonable output about those, it just starts to compile and fails.
Also I see it seems to require qt components. Those are sometimes a bit messy to deal with.
you see that Chart::Gnuplot is installing Gnuplot (and even a very specific version) “manually” in a “traditional” way with some options in a “custom” path.
my $prefix = "$HOME/.p6chart-gnuplot";
$gnuplot = "$prefix/bin/gnuplot";
That is probably not what you want - especially not on Nix.
So, if you need that package in Raku, one way to make it work would be to
fetch the repo (fetchFromGithub)
patch META6.json and remove Chart::Gnuplot::CustomBuilder
patch Gnuplot.pm6 on line 46 and set gnuplot executable
and then run zef install --debug --/build . from the patched repo
I was playing around a bit and arrived that “work in progress” here:
Maybe it helps. Maybe you encourage the owner of Chart::Gnuplot to improve on the build process of the library to make it more generic and stable and rely perhaps on the system-installed gnuplot - if that is avialable.
I am also a beginner in Nix. Maybe someone with more experience or ChatGPT & Co. can help with b.)?
However, I guess that improving the CustomBuilder.pm6 module itself - maybe re-considering the hard-coded approach of installing gnuplot - even when it is already installed on the sytem - would benefit the module in general. And finaly maybe setting up a github action to validate, if the module can be installed on Linux/Mac/Windows and Nix, would help potential users of Chart::Gnuplot.