nginx: simplify the postInstall phase

Per suggestion from @ajs124, we can rely on the
"move-sbin" setup hook to move the executable
to $out/bin instead of doing it manually and
simplify accoringly.
This commit is contained in:
Matthias Treydte
2022-05-22 10:35:51 +02:00
parent 2fd6e6e264
commit ecb166b3e3
+2 -4
View File
@@ -22,7 +22,7 @@ outer@{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt
, extraPatches ? []
, fixPatch ? p: p
, preConfigure ? ""
, postInstall ? null
, postInstall ? ""
, meta ? null
, nginx-doc ? outer.nginx-doc
, passthru ? { tests = {}; }
@@ -165,9 +165,7 @@ stdenv.mkDerivation {
postInstall =
let
noSourceRefs = lib.concatMapStrings (m: "remove-references-to -t ${m.src} $out/sbin/nginx\n") modules;
in noSourceRefs + (if postInstall != null then postInstall else ''
mv $out/sbin $out/bin
'');
in noSourceRefs + postInstall;
passthru = {
modules = modules;