nixpkgs/maintainers/scripts/nix-generate-from-cpan.nix
Eelco Dolstra 629daa2102 Rewrite the CPAN generator to Perl
Also:

- It's now installable by doing "nix-env -i nix-generate-from-cpan".

- It maps dependencies to the correct attribute (e.g. HTML::HeadParser
  is mapped to HTMLParser).

- It automatically selects buildPerlPackage or buildPerlModule.

- It's documented in the manual.
2013-06-13 15:56:23 +02:00

22 lines
589 B
Nix

{ stdenv, makeWrapper, perl, perlPackages }:
stdenv.mkDerivation {
name = "nix-generate-from-cpan-1";
buildInputs = [ makeWrapper perl perlPackages.YAML perlPackages.JSON ];
unpackPhase = "true";
buildPhase = "true";
installPhase =
''
mkdir -p $out/bin
cp ${./nix-generate-from-cpan.pl} $out/bin/nix-generate-from-cpan
wrapProgram $out/bin/nix-generate-from-cpan --set PERL5LIB $PERL5LIB
'';
meta = {
maintainers = [ stdenv.lib.maintainers.eelco ];
description = "Utility to generate a Nix expression for a Perl package from CPAN";
};
}