Commit Graph

122 Commits

Author SHA1 Message Date
Martin Weinelt
8d6d3999f9 nginx: make module source trees writable
The config script of multiple nginx modules must be able to write into
its source tree, so let's accumulate this logic once in nginx instead of
in multiple modules.
2026-07-31 21:49:51 +02:00
Martin Weinelt
332e43b0cc nginxModules: upgrade to derivations
This is how we gain proper versioning, standard patch application,
automatic updates. In total a more healthy nginx module package set.
2026-07-31 21:44:51 +02:00
Eman Resu
a425506cd5 various: fix license breakages 2026-07-15 13:57:18 -04:00
Ilan Joselevich
c1904aff0e nginx: add nginx-lua to passthru.tests
Forgot to add it in #535081
2026-07-13 22:05:15 +02:00
Maximilian Bosch
5fd9527f61 nginx: add ma27 and leona to maintainers, remove inactive maintainers (#536585) 2026-06-29 10:33:26 +00:00
Leona Maroni
28d04b39d2 nginx: add ma27 and leona to maintainers and remove inactive maintainers 2026-06-29 10:52:48 +02:00
Martin Weinelt
e9f301fcf7 nginx: fix test and update script passthru
Otherwise all nginx forks gain all of nginx' tests.
2026-06-28 03:35:12 +02:00
Raito Bezarius
6a63a4ad8b pkgs/*: drop maintenanceship of various packages
I have effectively renounced on maintaining all these packages and I do
not plan to return them except if I'm forced to.

I am also fine with most of these packages being dropped for next
releases if no maintainer shows up.

Change-Id: I8d167c8029b6991181bd7a094af21c3313af2b51
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-24 20:34:45 +02:00
Sandro Jäckel
562cb7f3e8 nginx: 1.30.0 -> 1.30.1 2026-05-13 21:36:55 +02:00
Wolfgang Walther
550ed29363 teams/helsinki-systems: drop 2026-01-14 09:46:22 +01:00
Wolfgang Walther
dfe9bbe186 teams/stridtech: drop 2026-01-11 00:14:22 +01:00
Ihar Hrachyshka
c539fa85e3 treewide: remove remaining 'with [a-zA-Z]*lib;' from pkgs
Partial #208242
2026-01-06 20:47:21 -05:00
Martin Weinelt
6d95c0c8b6 nginxQuic, angieQuic: retire
> The ngx_http_v3_module module (1.25.0) provides experimental support
> for HTTP/3.

Yes, still experimental, at least in nginx. No mention in angie.

> 0-RTT support requires the OpenSSL library version 3.5.1 or higher.
> Alternatively, BoringSSL, LibreSSL, or QuicTLS libraries can be used to
>  build and run this module.

But OpenSSL gets the first mention and our OpenSSL version right now is
3.6.0.

That means we don't need two more packages to ship nginx built with
QuicTLS which does not yet support PQ crypto right.
2025-11-25 00:13:58 +01:00
nixpkgs-ci[bot]
f38ce7a3f7 Merge staging-next into staging 2025-10-14 08:48:06 +00:00
Luna Nova
e7fbed853b treewide: remove usages of obsolete pie hardening flag 2025-10-09 10:13:03 -07:00
Leona Maroni
b76c36dcdc nixos/tests/acme: introduce new test nginx without reload 2025-09-23 15:39:24 +02:00
Artturin
f25d8cd328 nginx: Apply patch to fix endianess detection
Fixes corrupted date and a corrupte HTTP header field `/nn1R7cu0=3l`

```
date: 52anAoe1x3Wt3H4l1u0sc3.632 GMT
curl: (92) Invalid HTTP header field was received: frame type: 1, stream: 1, name: [/nn1R7cu0=3l], value: [bytes]
```

The patch is 4+ years old yet no one has had this problem?

Fixes https://www.github.com/NixOS/nixpkgs/issues/437626
2025-09-07 16:10:04 +03:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Pol Dellaiera
8c742e834f nginx: build with zlib-ng in compatibility mode (#399565) 2025-05-06 15:32:30 +02:00
Fernando Rodrigues
05580f4b44 treewide: switch instances of lib.teams.*.members to the new meta.teams attribute
Follow-up to #394797.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2025-04-25 22:20:17 -03:00
Izorkin
f8f5f0848c nginx: build with zlib-ng in compatibility mode
Nginx version 1.27.4 and above is compatible with zlib-ng versions 2.2.x:
https://github.com/nginx/nginx/pull/403
2025-04-17 23:04:08 +03:00
Wolfgang Walther
95d84cd27b nginxModules.zip: init 2025-03-11 09:48:01 +01:00
Lucas Savva
229640ed3a nixos/tests/acme: Refactor test suite
Split tests up based on certain use cases:

- http01-builtin: Tests most functionality of the core module, such
 as the systemd and hashing components, whilst utilising lego's built
 in http01 resolution mechanis.
- dns01: Tests only that DNS01 renewal works as expected.
- nginx: Tests nginx compatability
- httpd: Tests httpd compatability
- caddy: Tests caddy compatability
2025-02-22 23:58:29 +00:00
Franz Pletz
0317f91517 nginx: add fixed zlib-ng patch 2025-02-11 02:53:58 +01:00
misuzu
1e13e5b37d nginx: Fix cross-OS build (#371960) 2025-02-10 20:17:39 +02:00
Wolfgang Walther
1c6126f709 various: replace substituteAll with replaceVars
A few more interesting cases, separated from the big treewide for better
visibility and testing.
2025-01-26 17:18:59 +01:00
Artemis Tosini
65580eea00 nginx: Fix cross-OS build
nginx uses uname to find the target platform by default.
This works fine when building locally or when building on the same OS
for most architectures, but breaks when building e.g. Linux to BSD.

Explicitly tell the target to the configure script instead.
2025-01-08 00:23:11 +00:00
Izorkin
1bea45e135 angie: 1.7.0 -> 1.8.0 2024-12-20 14:50:52 +03:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Christoph Heiss
b3eca67865 nixos/openresty: fix build with nginx modules (#362348)
When adding modules to openresty, by either

- using `.override { modules = [ ..]; }` directly
- adding them to `services.nginx.additionalModules` or
- enabling e.g. something like `services.nginx.recommendedZstdSettings`

the build will then fail, as the actual `nginx` binary lands in
`nginx/bin/nginx` for openresty, and is only symlinked to `bin/nginx`
(and `bin/openresty`, for that matter).

This breaks the post-install script for nginx when removing references
to the aforementioned modules, since `remove-references-to` skips
symlinks. Thus, just read the symlink before in this case.

`readlink -fn` will read the symlink if it is one, otherwise just
returns the path itself.

The phase is also moved after the package-specific postInstall phase, at
that might move binaries around or create symlinks - as is the case for
openresty.

Can be easily reproduced using e.g.:

$ nix build --impure -E 'with import ./. {}; openresty.override { modules = [ nginxModules.zstd ]; }' -L

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2024-12-06 20:15:26 +02:00
Franz Pletz
352dc5c800 nginx: fix compatibility with zlib-ng (#358812) 2024-11-27 14:34:52 +01:00
Tristan Ross
7818372094 nginx: fix building with clang on linux (#358999) 2024-11-26 20:39:01 -08:00
Franz Pletz
5ae0b27ab9 nginx: fix compatibility with zlib-ng
Fix #357522.
2024-11-26 20:35:28 +01:00
Philipp Bartsch
8571045ea9 nginx: fix building with clang on linux
Building pkgsLLVM.nginx got the same errors as the ones previously
disabled for darwin.
2024-11-25 14:29:14 +01:00
Elliot Cameron
06b9024cc0 nginx: upgrade pcre to pcre2
Nginx builds with pcre2 by default as of version 1.21.5.
2024-11-14 15:07:36 -05:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
superherointj
cca34e8615 nginx: add stridtech team as maintainer 2024-07-12 12:16:22 +02:00
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
superherointj
e3e087e9ea nginx: make geoip optional 2024-05-25 12:08:22 -03:00
superherointj
64973309bb nginx: make image filter optional
Reduces nginx package size from 109.88 MiB to 41.99 MiB. Reduction of -67.88 MiB.

GD (libgd.github.io) is a library for the dynamic creation of images.

Co-authored-by: @ulrikstrid
2024-05-25 12:08:22 -03:00
superherointj
27a9dd9264 pkgsMusl.nginx: fix build
Fixes:

> error: #warning usage of non-standard #include <sys/cdefs.h> is deprecated [-Werror=cpp]
2024-05-22 20:58:30 -03:00
stuebinm
ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00
Dee Anzorge
f124c73686 nginx: change etags for statically compressed files served from store
Per RFC 9110, [section 8.8.1][1], different representations of the same
resource should have different Etags:

> A strong validator is unique across all versions of all
> representations associated with a particular resource over time.
> However, there is no implication of uniqueness across representations
> of different resources (i.e., the same strong validator might be in
> use for representations of multiple resources at the same time and
> does not imply that those representations are equivalent)

When serving statically compressed files (ie, when there is an existing
corresponding .gz/.br/etc. file on disk), Nginx sends the Etag marked
as strong. These tags should be different for each compressed format
(as shown in  an explicit example in section [8.8.3.3][2] of the RFC).
Upstream Etags are composed of the file modification timestamp and
content length, and the latter generally changes between these
representations.

Previous implementation of Nix-specific Etags for things served from
store used the store hash. This is fine to share between different
files, but it becomes a problem for statically compressed versions of
the same file, as it means Nginx was serving different representations
of the same resource with the same Etag, marked as strong.

This patch addresses this by imitating the upstream Nginx behavior, and
appending the value of content length to the store hash.

[1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-validator-fields
[2]:
https://www.rfc-editor.org/rfc/rfc9110.html#name-example-entity-tags-varying
2024-01-13 22:07:50 +01:00
Izorkin
10c06cb060 nginx: enable ktls support by default 2024-01-01 12:02:57 +03:00
Robin Gloster
b5556f2c37 Merge pull request #268109 from helsinki-systems/helsinki-maintainer-team
maintainers/teams: init and add helsinki-systems
2023-12-20 11:43:29 +01:00
Izorkin
86efccfa45 angie: init at 1.4.0 2023-12-17 22:43:13 +03:00
Izorkin
00cb53de4f nginx: fix nginx binary pathname 2023-12-17 16:51:29 +03:00
ajs124
7b6580dba4 maintainers/teams: init and add helsinki-systems 2023-11-30 19:11:08 +01:00
Weijia Wang
add7a091c6 nginx: fix build on darwin 2023-11-18 17:01:10 +01:00
Artturin
d3234553aa nixosTests.nginx-sandbox: remove broken test and move the sandboxing test to the openresty test
nginx lua needs resty

the enableSandbox option of nginx was removed in 535896671b

the test fails with

```
vm-test-run-nginx-sandbox> machine # [   47.753580] nginx[1142]: nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
vm-test-run-nginx-sandbox> machine # [   47.756064] nginx[1142]: nginx: [alert] failed to load the 'resty.core' module (https://github.com/openresty/lua-resty-core); ensure you are using an OpenResty release from https://openresty.org/en/download.html (reason: module 'resty.core' not found:
vm-test-run-nginx-sandbox> machine # [   57.911766] systemd[1]: Failed to start Nginx Web Server.
```
2023-10-23 06:09:45 +03:00