mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
7ca412a2fa
This makes the detection of core modules a bit more robust by checking the module inclusion in a pure Perl interpreter. This ensures that any extra path in the `nix-generate-from-cpan` script's `PERL5LIB` does not affect the generated package expression.
26 lines
728 B
Nix
26 lines
728 B
Nix
{ stdenv, makeWrapper, perl, perlPackages }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "nix-generate-from-cpan-3";
|
|
|
|
buildInputs = with perlPackages; [
|
|
makeWrapper perl CPANMeta GetoptLongDescriptive CPANPLUS Readonly Log4Perl
|
|
];
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
installPhase =
|
|
''
|
|
mkdir -p $out/bin
|
|
cp ${./nix-generate-from-cpan.pl} $out/bin/nix-generate-from-cpan
|
|
patchShebangs $out/bin/nix-generate-from-cpan
|
|
wrapProgram $out/bin/nix-generate-from-cpan --set PERL5LIB $PERL5LIB
|
|
'';
|
|
|
|
meta = {
|
|
maintainers = with stdenv.lib.maintainers; [ eelco rycee ];
|
|
description = "Utility to generate a Nix expression for a Perl package from CPAN";
|
|
platforms = stdenv.lib.platforms.unix;
|
|
};
|
|
}
|