libredirect: Add missing phase hooks
This commit is contained in:
parent
bb1058f1f0
commit
5ca0265505
|
@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
|
||||||
outputs = ["out" "hook"];
|
outputs = ["out" "hook"];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
$CC -Wall -std=c99 -O3 -fPIC -ldl -shared \
|
$CC -Wall -std=c99 -O3 -fPIC -ldl -shared \
|
||||||
${lib.optionalString stdenv.isDarwin "-Wl,-install_name,$out/lib/$libName"} \
|
${lib.optionalString stdenv.isDarwin "-Wl,-install_name,$out/lib/$libName"} \
|
||||||
-o "$libName" \
|
-o "$libName" \
|
||||||
|
@ -22,9 +24,13 @@ stdenv.mkDerivation rec {
|
||||||
if [ -n "$doInstallCheck" ]; then
|
if [ -n "$doInstallCheck" ]; then
|
||||||
$CC -Wall -std=c99 -O3 test.c -o test
|
$CC -Wall -std=c99 -O3 test.c -o test
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
install -vD "$libName" "$out/lib/$libName"
|
install -vD "$libName" "$out/lib/$libName"
|
||||||
|
|
||||||
mkdir -p "$hook/nix-support"
|
mkdir -p "$hook/nix-support"
|
||||||
|
@ -36,6 +42,8 @@ stdenv.mkDerivation rec {
|
||||||
export LD_PRELOAD="$out/lib/$libName"
|
export LD_PRELOAD="$out/lib/$libName"
|
||||||
''}
|
''}
|
||||||
SETUP_HOOK
|
SETUP_HOOK
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
|
|
Loading…
Reference in a new issue