Commit Graph

15 Commits

Author SHA1 Message Date
Artturi
74f33d9a4a
Merge pull request #164825 from ilya-fedin/fhs-less-copy 2022-04-11 16:37:01 +03:00
Jonathan Ringer
44afbd4432 buildFHSUserEnvBubblewrap: append graphics share to XDG_DATA_DIR 2022-03-24 12:53:39 -07:00
David McFarland
d5bf6bac5c buildFHSUserEnv{Chroot,Bubblewrap}: fix handling of glib schema
An error would occur if share/glib-2.0/schema was a symlink.
2022-03-20 20:38:53 -03:00
Ilya Fedin
0f488afad2 build-fhs-userenv-bubblewrap: symlink share directory when there's no need to merge
There's no need to copy files if the directory won't be merged with multilib one leading to unnecessary increase of closure size
2022-03-19 10:09:55 +04:00
Artturi
b54e7571e2
Merge pull request #161739 from Artturin/gsettingsfhsenv 2022-03-15 00:03:56 +02:00
Artturin
3e7e6ab84a buildFHSUserEnv{Chroot,Bubblewrap}: link gsettings-schemas to the FHS location
We shouldn't need to use wrapGAppsHook in expressions
that use this builder.
2022-03-03 01:22:09 +02:00
Daniel Fullmer
0a8007498f bash: use default PATH in FHS environments
If bash is executed within an environment where PATH is not set, it uses
the DEFAULT_PATH_VALUE compiled into bash to set PATH. In nixpkgs we set
this to /no-such-path by default. This makes sense in a nixpkgs/NixOS
environment since paths like /bin or /usr/bin should not be used.
However, when bash is used inside an FHS environment, this produces
results that differ from distributions which follow the FHS standard.

Before this change:
$ steam-run env -i /bin/bash -c 'echo $PATH'
/no-such-path

After this change:
$ steam-run env -i /bin/bash -c 'echo $PATH'
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
2022-02-27 15:59:39 -08:00
Michal Sojka
b681ad3254 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.
2021-06-27 08:33:51 +02:00
Luigi Sartor Piucco
548d50d695 build-fhs-userenv-bubblewrap:->writeShellScriptBin 2021-02-23 11:47:40 -03:00
Luigi Sartor Piucco
bdd9027760 fhs-bubblewrap: merge /usr/share from both archs 2021-02-22 14:35:45 -03:00
Benedikt Morbach
d5cbb650e1 fhs-userenv-bubblewrap: add ld.so.conf/cache to fhs 2021-02-22 14:35:44 -03:00
Jörg Thalheim
b1d86d0e51 build-fhs-user-env-bubblewrap: consistent camelCase 2020-08-17 10:05:25 +02:00
Michael Eden
2da4f24e22 fhs-userenv-bubblewrap: bind mount parts of host etc directly 2020-08-17 08:49:29 +02:00
Michael Eden
2ddb43ec24 fhs-userenv-bubblewrap: change to using bubblewrap over chrootenv 2020-08-17 08:49:24 +02:00
Atemu
fafbfd2305 fhs-userenv-bubblewrap: start with build-fhs-userenv
Just here to track @illegalprime's actual changes to build-fhs-userenv in the
next commits
2020-08-17 08:48:31 +02:00