summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rangehttpserver
diff options
context:
space:
mode:
authorMichal Sojka <michal.sojka@cvut.cz>2021-06-25 18:08:56 +0200
committerMichal Sojka <michal.sojka@cvut.cz>2021-06-27 08:33:51 +0200
commitb681ad32540c5bcb93d3cb98dfd25f22f2eb5503 (patch)
treeab3336505f9899e07bc8e50924f2def1acc2dc57 /pkgs/development/python-modules/rangehttpserver
parent9470f462d594dc6e59be2c5880ba569c28873943 (diff)
buildFHSUserEnv: Allow having custom /opt in the FHS environment
buildFHSUserEnv is meant primarily for running 3rd-party software which is difficult to patch for NixOS. Such software is often built to run from /opt. Currently, running such a software from FHS environment is difficult for two reasons: 1. If the 3rd-party software is put into the Nix store via a simple derivation (with e.g. installPhase = "dpkg-deb -x $src $out"), the content of /opt directory of that derivation does not appear in the FHSEnv even if the derivation is specified in targetPkgs. This is why we change env.nix. 2. If using buildFHSUserEnvChroot and the host system has the /opt directory, it always gets bind-mounted to the FHSEnv even if some targetPkgs contain /opt (NB buildFHSUserEnvBubblewrap does not have this problem). If that directory is not accessible for non-root users (which is what docker's containerd does with /opt :-(), the user running the FHSEnv cannot use it. With the change in chrootenv.c, /opt is not bind-mounted to the container, but instead created as user-modifiable symlink to /host/opt (see the init attribute in build-fhs-userenv/default.nix). If needed, the user can remove this symlink and create an empty /opt directory which is under his/her control.
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver')
0 files changed, 0 insertions, 0 deletions