From 5ca02655057bb568f09b3aed4acee44e3f805291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Sun, 23 May 2021 16:59:43 +0200 Subject: [PATCH] libredirect: Add missing phase hooks --- pkgs/build-support/libredirect/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/build-support/libredirect/default.nix b/pkgs/build-support/libredirect/default.nix index 4678d35442f..b5836d1a380 100644 --- a/pkgs/build-support/libredirect/default.nix +++ b/pkgs/build-support/libredirect/default.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { outputs = ["out" "hook"]; buildPhase = '' + runHook preBuild + $CC -Wall -std=c99 -O3 -fPIC -ldl -shared \ ${lib.optionalString stdenv.isDarwin "-Wl,-install_name,$out/lib/$libName"} \ -o "$libName" \ @@ -22,9 +24,13 @@ stdenv.mkDerivation rec { if [ -n "$doInstallCheck" ]; then $CC -Wall -std=c99 -O3 test.c -o test fi + + runHook postBuild ''; installPhase = '' + runHook preInstall + install -vD "$libName" "$out/lib/$libName" mkdir -p "$hook/nix-support" @@ -36,6 +42,8 @@ stdenv.mkDerivation rec { export LD_PRELOAD="$out/lib/$libName" ''} SETUP_HOOK + + runHook postInstall ''; doInstallCheck = true;