mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
676ef10377
This should enable `nix run` to work under shells like fish and zsh, as well as making child shells not needlessly reset any environment that should be inherited. Implementation adapted from NixOS.
13 lines
370 B
Nix
13 lines
370 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
test = ''
|
|
echo checking /run/current-system/sw/bin in setEnvironment >&2
|
|
grep 'export PATH=.*:/run/current-system/sw/bin' ${config.system.build.setEnvironment}
|
|
|
|
echo checking /bin and /sbin in setEnvironment >&2
|
|
grep 'export PATH=.*:/usr/bin:/usr/sbin:/bin:/sbin' ${config.system.build.setEnvironment}
|
|
'';
|
|
}
|