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

Perl Package: Spreadsheet::Read{,SXC} #29265

Closed
wants to merge 2 commits into from

Conversation

matthiasbeyer
Copy link
Contributor

Motivation for this change

I need these two modules for the build process of the codebase I work on in my masters thesis, so why not submitting them to nixpkgs? 😄

I left out the maintainer for the packages because I am no perl guy and I will probably not need them anymore in half a year...

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
    • Linux
  • 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.

@rycee
Copy link
Member

rycee commented Sep 12, 2017

Better use nix-generate-from-cpan for Perl packages:

$ nix-generate-from-cpan Spreadsheet::Read
…
  SpreadsheetRead = buildPerlPackage rec {
    name = "Spreadsheet-Read-0.74";
    src = fetchurl {
      url = "mirror://cpan/authors/id/H/HM/HMBRAND/${name}.tgz";
      sha256 = "b95e2100a2f30c6b8c8f9b399c55446a7c56d30c37f80748e6a141eb07a4cb80";
    };
    buildInputs = [ TestNoWarnings ];
    propagatedBuildInputs = [ DataPeek ];
    meta = {
      description = "Meta-Wrapper for reading spreadsheet data";
      license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
    };
  };

Unfortunately, the Spreadsheet::ReadSXC package is not having correct meta data so need a bit of tweaking:

$ nix-generate-from-cpan Spreadsheet::ReadSXC
…
  SpreadsheetReadSXC = buildPerlPackage rec {
    name = "Spreadsheet-ReadSXC-0.20";
    src = fetchurl {
      url = "mirror://cpan/authors/id/T/TE/TERHECHTE/${name}.tar.gz";
      sha256 = "b2e4dd1c46453b3844be4bc8e069ea688d3882ea7818bf97cb53caa0c2b235b6";
    };
    propagatedBuildInputs = [ ArchiveZip XMLParser ];
    meta = {
      license = stdenv.lib.licenses.unknown;
    };
  };

E.g., need license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];, the description you wrote, and perhaps buildInputs = [ TestMore ];.

@aanderse
Copy link
Member

@matthiasbeyer Do you still need this or should the PR be closed?

@matthiasbeyer matthiasbeyer deleted the package-perl-read branch November 9, 2019 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants