Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
51 lines
935 B
Nix
51 lines
935 B
Nix
{
|
|
stdenv,
|
|
lib,
|
|
perlPackages,
|
|
makeWrapper,
|
|
}:
|
|
|
|
let
|
|
perconaToolkit = perlPackages.PerconaToolkit;
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
pname = perconaToolkit.name;
|
|
version = perconaToolkit.version;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
src = perconaToolkit;
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
# make sure dest already exists before symlink
|
|
# this prevents installing a broken link into the path
|
|
ln -s ${perconaToolkit}/lib $out/lib
|
|
ln -s ${perconaToolkit}/share $out/share
|
|
|
|
for cmd in ${perconaToolkit}/bin/*; do
|
|
ln -s $cmd $out/bin
|
|
done
|
|
'';
|
|
|
|
dontStrip = true;
|
|
postFixup = ''
|
|
for cmd in $out/bin/*; do
|
|
wrapProgram $cmd --prefix PERL5LIB
|
|
done
|
|
'';
|
|
|
|
meta = {
|
|
inherit (perconaToolkit.meta)
|
|
description
|
|
homepage
|
|
license
|
|
platforms
|
|
changelog
|
|
;
|
|
|
|
maintainers = with lib.maintainers; [ michaelglass ];
|
|
};
|
|
}
|