fhs-user-env.nix 379 B

123456789101112131415161718192021222324
  1. { extraPkgsFn ? (pkgs: [])
  2. , shellName ? "fhs"
  3. , pkgs ? import <nixpkgs> {}
  4. }:
  5. (
  6. let
  7. extraPkgs = extraPkgsFn pkgs;
  8. in
  9. pkgs.buildFHSUserEnv rec {
  10. name = shellName;
  11. runScript = "zsh -i";
  12. targetPkgs = pkgs: (
  13. with pkgs; [
  14. # Edit with your needs
  15. zsh
  16. ] ++ extraPkgs
  17. );
  18. profile = ''
  19. export NIX_FHS=${name}
  20. '';
  21. }
  22. ).env