From ecb166b3e3890504af0828bfd2e03edd6f720971 Mon Sep 17 00:00:00 2001 From: Matthias Treydte Date: Sun, 22 May 2022 10:35:48 +0200 Subject: [PATCH] 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. --- pkgs/servers/http/nginx/generic.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 039139e9083c..4e0572b10393 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -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;