uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
52
pkgs/development/interpreters/perl/wrapper.nix
Normal file
52
pkgs/development/interpreters/perl/wrapper.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ lib, perl, buildEnv, makeWrapper
|
||||
, extraLibs ? []
|
||||
, extraOutputsToInstall ? []
|
||||
, postBuild ? ""
|
||||
, ignoreCollisions ? false
|
||||
, requiredPerlModules
|
||||
}:
|
||||
|
||||
# Create a perl executable that knows about additional packages.
|
||||
let
|
||||
env = let
|
||||
paths = requiredPerlModules (extraLibs ++ [ perl ] );
|
||||
in buildEnv {
|
||||
name = "${perl.name}-env";
|
||||
|
||||
inherit paths;
|
||||
inherit ignoreCollisions;
|
||||
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
# we create wrapper for the binaries in the different packages
|
||||
postBuild = ''
|
||||
if [ -L "$out/bin" ]; then
|
||||
unlink "$out/bin"
|
||||
fi
|
||||
mkdir -p "$out/bin"
|
||||
|
||||
# take every binary from perl packages and put them into the env
|
||||
for path in ${lib.concatStringsSep " " paths}; do
|
||||
if [ -d "$path/bin" ]; then
|
||||
cd "$path/bin"
|
||||
for prg in *; do
|
||||
if [ -f "$prg" ]; then
|
||||
rm -f "$out/bin/$prg"
|
||||
if [ -x "$prg" ]; then
|
||||
makeWrapper "$path/bin/$prg" "$out/bin/$prg" --suffix PERL5LIB ':' "$out/${perl.libPrefix}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
'' + postBuild;
|
||||
|
||||
meta = perl.meta // { outputsToInstall = ["out"]; }; # remove "man" from meta.outputsToInstall. pkgs.buildEnv produces no "man", it puts everything to "out"
|
||||
|
||||
passthru = perl.passthru // {
|
||||
interpreter = "${env}/bin/perl";
|
||||
inherit perl;
|
||||
};
|
||||
};
|
||||
in env
|
||||
Loading…
Add table
Add a link
Reference in a new issue