diff options
author | Niklas Hambüchen <mail@nh2.me> | 2021-05-23 16:59:43 +0200 |
---|---|---|
committer | Pascal Bach <pascal.bach@nextrem.ch> | 2021-09-03 22:26:20 +0200 |
commit | 5ca02655057bb568f09b3aed4acee44e3f805291 (patch) | |
tree | 91b45026a6027704df8546f161cdf1c52264462c /pkgs/build-support | |
parent | bb1058f1f08b253fb65a2a4a5ca33d8c1632bb98 (diff) |
libredirect: Add missing phase hooks
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/libredirect/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/build-support/libredirect/default.nix b/pkgs/build-support/libredirect/default.nix index 4678d35442f61..b5836d1a3803a 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; |