From 1c64930e9fe7f20c0312057f82e3fb66e568f845 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 30 Aug 2020 12:33:03 -0400 Subject: 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 Tested-by: BuildkiteCI --- third_party/nix/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'third_party/nix') diff --git a/third_party/nix/default.nix b/third_party/nix/default.nix index fc3ed792e25f..5792c3034029 100644 --- a/third_party/nix/default.nix +++ b/third_party/nix/default.nix @@ -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? -- cgit 1.4.1