feat(tvix): Install profile scripts into the output

The nix package is expected to install /etc/profile.d/nix.sh and
/etc/profile.d/nix-daemon.sh into its output - these set the environment
variables expected by the client-side nix user commands, eg NIX_DAEMON.

Fixes: b/52
Change-Id: I5fb964c076f092d0ef7e1d49aca37875c866fb90
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1889
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
This commit is contained in:
Griffin Smith 2020-08-30 12:33:03 -04:00 committed by glittershark
parent 1ab6e658af
commit 1c64930e9f

View file

@ -146,6 +146,12 @@ in lib.fix (self: pkgs.llvmPackages.libcxxStdenv.mkDerivation {
substituteAll \
${src}/misc/systemd/nix-daemon.socket.in \
$out/lib/systemd/system/nix-daemon.socket
mkdir -p $out/etc/profile.d
substituteAll \
${src}/scripts/nix-profile.sh.in $out/etc/profile.d/nix.sh
substituteAll \
${src}/scripts/nix-profile-daemon.sh.in $out/etc/profile.d/nix-daemon.sh
'';
# TODO(tazjin): integration test setup?