+17
doc/builders/packages/etc-files.section.md
+17
doc/builders/packages/etc-files.section.md
···+Certain calls in glibc require access to runtime files found in /etc such as `/etc/protocols` or `/etc/services` -- [getprotobyname](https://linux.die.net/man/3/getprotobyname) is one such function.+On non-NixOS distributions these files are typically provided by packages (i.e. [netbase](https://packages.debian.org/sid/netbase)) if not already pre-installed in your distribution. This can cause non-reproducibility for code if they rely on these files being present.+If [iana-etc](https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.iana-etc.x86_64-linux) is part of your _buildInputs_ then it will set the environment varaibles `NIX_ETC_PROTOCOLS` and `NIX_ETC_SERVICES` to the corresponding files in the package through a _setup-hook_.+Nixpkg's version of [glibc](https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.glibc.x86_64-linux) has been patched to check for the existence of these environment variables. If the environment variable are *not set*, then it will attempt to find the files at the default location within _/etc_.
+1
doc/builders/packages/index.xml
+1
doc/builders/packages/index.xml
···
+12
-6
pkgs/data/misc/iana-etc/default.nix
+12
-6
pkgs/data/misc/iana-etc/default.nix
···-url = "https://github.com/Mic92/iana-etc/releases/download/${version}/iana-etc-${version}.tar.gz";+url = "https://github.com/Mic92/iana-etc/releases/download/${version}/iana-etc-${version}.tar.gz";
+3
pkgs/development/libraries/glibc/common.nix
+3
pkgs/development/libraries/glibc/common.nix
···
+51
pkgs/development/libraries/glibc/nix-nss-open-files.patch
+51
pkgs/development/libraries/glibc/nix-nss-open-files.patch
···