nixpkgs/nixos/modules/services/web-servers
Maximilian Bosch 8bc5104a6e
treewide: refactor .attrs.sh detection
When specifying the `builder` attribute in `stdenv.mkDerivation`, this
will be effectively transformed into

    builtins.derivation {
      builder = stdenv.shell;
      args = [ "-e" builder ];
    }

This also means that `default-builder.sh` is never sourced and as a
result it's not guaranteed that `$NIX_ATTRS_SH_FILE` is set to a correct
location[1].

Also, we need to source `.attrs.sh` to source `$stdenv`. So, the
following is done now:

* If `$NIX_ATTRS_SH_FILE` points to a correct location, then use it.
  Directly using `.attrs.sh` is problematic for `nix-shell(1)` usage
  (see previous commit for more context), so prefer the environment
  variable if possible.

* Otherwise, if `.attrs.sh` exists, then use it. See [1] for when this
  can happen.

* If neither applies, it can be assumed that `__structuredAttrs` is
  turned off and thus nothing needs to be done.

[1] It's possible that it doesn't exist at all - in case of Nix 2.3 or
    it can point to a wrong location on older Nix versions with a bug in
    `__structuredAttrs`.
2023-10-04 18:36:57 +02:00
..
apache-httpd
caddy nixos/caddy: ensure vhosts come after user-specified cfg.extraConfig 2023-09-18 11:12:19 +02:00
hitch
jboss treewide: refactor .attrs.sh detection 2023-10-04 18:36:57 +02:00
keter nixos/keter: fix port type 2023-06-21 18:23:47 +02:00
lighttpd treewide: use optionalString instead of 'then ""' 2023-06-24 20:19:19 +02:00
nginx nixos/nginx: allow enabling QUIC packet routing using eBPF 2023-09-19 16:16:34 +03:00
phpfpm
trafficserver
unit unit: 1.29.1 -> 1.30.0 2023-05-13 16:55:47 +03:00
varnish nixos: Use checks instead of extraDependencies 2023-05-11 21:18:38 +02:00
agate.nix
darkhttpd.nix
fcgiwrap.nix treewide: use more lib.optionalString 2023-04-07 13:38:33 +02:00
garage.md nixos: fix typos 2023-05-19 22:31:04 -04:00
garage.nix nixos/garage: Add an environmentFile option 2023-09-24 14:47:05 +02:00
hydron.nix
merecat.nix
mighttpd2.nix
minio.nix nixos/minio: allow distributed nodes 2023-07-03 21:51:02 +02:00
molly-brown.nix
pomerium.nix
rustus.nix nixos/rustus: add user name to enable restoring of backups 2023-08-13 12:59:20 +01:00
stargazer.nix nixos: fix typos 2023-05-19 22:31:04 -04:00
static-web-server.nix nixos/static-web-server: create module which uses upstream systemd units 2023-07-01 12:51:13 -04:00
tomcat.nix treewide: use more lib.optionalString 2023-04-07 13:38:33 +02:00
traefik.nix nixos/traefik: add environmentFiles option 2023-04-25 16:05:28 +02:00
ttyd.nix nixos/ttyd: fix example rendering 2023-06-30 18:14:37 +02:00
uwsgi.nix
zope2.nix