about summary refs log tree commit diff
path: root/pkgs/servers/http/nginx
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/http/nginx')
-rw-r--r--pkgs/servers/http/nginx/generic.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix
index 9685c4aa2e90..b3ce65abf5f1 100644
--- a/pkgs/servers/http/nginx/generic.nix
+++ b/pkgs/servers/http/nginx/generic.nix
@@ -25,6 +25,7 @@ outer@{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt
 , fixPatch ? p: p
 , postPatch ? ""
 , preConfigure ? ""
+, preInstall ? ""
 , postInstall ? ""
 , meta ? null
 , nginx-doc ? outer.nginx-doc
@@ -68,6 +69,7 @@ stdenv.mkDerivation {
     ++ mapModules "inputs";
 
   configureFlags = [
+    "--sbin-path=bin/nginx"
     "--with-http_ssl_module"
     "--with-http_v2_module"
     "--with-http_realip_module"
@@ -178,13 +180,13 @@ stdenv.mkDerivation {
     if [[ -e man/nginx.8 ]]; then
       installManPage man/nginx.8
     fi
-  '';
+  '' + preInstall;
 
   disallowedReferences = map (m: m.src) modules;
 
   postInstall =
     let
-      noSourceRefs = lib.concatMapStrings (m: "remove-references-to -t ${m.src} $out/sbin/nginx\n") modules;
+      noSourceRefs = lib.concatMapStrings (m: "remove-references-to -t ${m.src} $out/bin/nginx\n") modules;
     in noSourceRefs + postInstall;
 
   passthru = {