perlPackages.PkgConfig: fix cross compilation
Change the way we source $PkgConfig::VERSION to avoid loading unnecessary libraries during cross-build.
This commit is contained in:
parent
4ebe496bad
commit
3af3ca8cc2
1 changed files with 7 additions and 1 deletions
|
@ -17207,13 +17207,19 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
PkgConfig = buildPerlPackage {
|
||||
PkgConfig = buildPerlPackage rec {
|
||||
pname = "PkgConfig";
|
||||
version = "0.25026";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/P/PL/PLICEASE/PkgConfig-0.25026.tar.gz";
|
||||
sha256 = "1862hzlkibqsgynrnwg43acycp4rlsv19gsybjwq39nnqb9mxfjd";
|
||||
};
|
||||
# support cross-compilation by simplifying the way we get version during build
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile.PL --replace \
|
||||
'do { require "./lib/PkgConfig.pm"; $PkgConfig::VERSION; }' \
|
||||
'"${version}"'
|
||||
'';
|
||||
meta = {
|
||||
description = "Pure-Perl Core-Only replacement for pkg-config";
|
||||
license = with lib.licenses; [ artistic1 gpl1Plus ];
|
||||
|
|
Loading…
Reference in a new issue