Skip to content

Instantly share code, notes, and snippets.

@kayvank
Created December 13, 2021 20:20
Show Gist options
  • Save kayvank/a9a8fc388889cbed49282ec0ec52054e to your computer and use it in GitHub Desktop.
Save kayvank/a9a8fc388889cbed49282ec0ec52054e to your computer and use it in GitHub Desktop.
getenv PATH does not reflect nix-shell $PATH
Here is my workflow:
$ nix-shell
$ emacs&
from emacs 27.02 (getenv "PATH")
/run/wrapper/bin:/home/kayvan/.nix-profile/bin:/etc/profiles/per-user/kayvan/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
-------------------------- from zsh echo $PATH ---------
echo $PATH
/nix/store/99dvxgs2vqcsa05b793ympydrqaxi19z-bash-interactive-5.1-p12/bin:/nix/store/lgsgcv0fx9iyyzvhblwll5vkxa96a522-ghc-8.10.7-with-packages/bin:/nix/store/l7jy03bn7gc5j0y7fmv3dws5krlxk437-hpack-0.34.4/bin:/nix/store/p4axvsdpc70w7d9g4kkl3d25swh71fgd-patchelf-0.13/bin:/nix/store/4g5fidyk19akng9n91cql60ylrjq93s6-gcc-wrapper-10.3.0/bin:/nix/store/gbaf9hcffnrblpj7qv5lsrkcvjny08cc-gcc-10.3.0/bin:/nix/store/m2wvmdkfslxswx4zp77qkpbl6y42n840-glibc-2.33-55-bin/bin:/nix/store/qmn7m3wk8b1v1ljhb2dzyjh41d6ingp6-coreutils-9.0/bin:/nix/store/95b5bf92ck38jp5lyih5kw9f2glx4gkm-binutils-wrapper-2.35.1/bin:/nix/store/ffcrrgb6k5h7crr93dj90bi9fy1jvj16-binutils-2.35.1/bin:/nix/store/h22cdxm1252slxvb3qyfx1lnn85x5f0c-ncurses-6.2/bin:/nix/store/70qv6r1bgjvv08jfs12281ln4awg919s-haskell-language-server-1.4.0.0/bin:/nix/store/g480ilssh75k2s2682s2ap3n74pnxs4x-aeson-pretty-0.8.8/bin:/nix/store/m0xw42nwrlfznfasiqfzwdavi4421x32-ghc-8.10.7/bin:/nix/store/2lkk8iw148b991mrp15as76hjkj607iq-ghcide-1.4.2.3/bin:/nix/store/c29zjxzy0xn1rbnp8fb8bhlpi5ms5c2f-constraints-extras-0.3.1.0/bin:/nix/store/zrjhj5ccd76c38dxlj86jv4v66gar38r-hie-bios-0.7.6/bin:/nix/store/rv02ysn6rgqb3hhqr4vppgcp0x8nw5c6-hiedb-0.4.0.0/bin:/nix/store/7kwxgsfy2bj3499gy2l7v413hkf4f85h-shake-0.19.6/bin:/nix/store/1hdg70212bz096irhixypjngpqx3rf4r-implicit-hie-0.1.2.6/bin:/nix/store/kiy8pip1fpfy09c1kz02vwralklwbjhc-retrie-1.0.0.0/bin:/nix/store/grzgp6k5v1xk1a93dgmvqi6ir7dkadky-brittany-0.13.1.2/bin:/nix/store/apkmbcy61s0m06lavv534qz43x5b85wr-floskell-0.10.5/bin:/nix/store/yj1lbyfrvj0kx0170h7mnvr3nirbk7bf-fourmolu-0.3.0.0/bin:/nix/store/4lp39wgxz65g9si4g01gi0k3ghckrm6x-apply-refact-0.9.3.0/bin:/nix/store/bzq487wxnjj735ryvcb6xi24s3w84r4r-hlint-3.2.7/bin:/nix/store/frhizrx27va6h8hc4z6spsn42rr9n494-cpphs-1.20.9.1/bin:/nix/store/vpxds49irccybl3gapyvrnf1mvlnimkf-hscolour-1.24.4/bin:/nix/store/g9m9k9fb8br211ak6286f69zbjqk3qmz-ormolu-0.1.4.1-bin/bin:/nix/store/62x1chprqvqgr2ma08cyi1zsgp75ikph-stylish-haskell-0.13.0.0/bin:/nix/store/69fbapbd5dv647ajw2r27wyb7g4bmihm-cabal-install-3.6.2.0/bin:/nix/store/7qj9jlzb6pflf9ayyyscjwdz6ncq8s05-ghcid-0.8.7-bin/bin:/nix/store/hy84m05sihhwwdj9jyky0sscncc1zxb2-niv-0.2.19-bin/bin:/nix/store/aka1n14a707drgsxlsd4z8jpfhk0i0y4-nixpkgs-fmt-1.2.0/bin:/nix/store/qmn7m3wk8b1v1ljhb2dzyjh41d6ingp6-coreutils-9.0/bin:/nix/store/0xzqirrdxw4h9kr0sq4rp1chad5v8fg9-findutils-4.8.0/bin:/nix/store/g7540qwvqf851bd94i04mq0fm98z0j25-diffutils-3.8/bin:/nix/store/d9drqi4daha3f0b6wm5y0fnabbggy1r2-gnused-4.8/bin:/nix/store/vcffj451l0bymy3gzkhb9hs4yk0g9yjm-gnugrep-3.7/bin:/nix/store/2nxp2psvpfwgh2j0bb6kdrirn5ak36qa-gawk-5.1.0/bin:/nix/store/zxqrdg4ckws9vblws18ghm1p87xiswvv-gnutar-1.34/bin:/nix/store/y65mab69w9m64l2fw5bg9pzkkh15add4-gzip-1.11/bin:/nix/store/hk7rzdm8n0dgln90gds4wbdv0kcf43zm-bzip2-1.0.6.0.2-bin/bin:/nix/store/4xzvmpwx8lhjgiypdkffl4nzg6pb4lcb-gnumake-4.3/bin:/nix/store/phqa311klldrcbwid1i22dwnpfc9dnma-bash-5.1-p8/bin:/nix/store/x2lra0cxlivzcf91pi1pw8l2r23hwwnr-patch-2.7.6/bin:/nix/store/bgl52wc7fkb9naf7rfpq0jxjd3z27bxk-xz-5.2.5-bin/bin:/run/wrappers/bin:/home/kayvan/.nix-profile/bin:/etc/profiles/per-user/kayvan/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment