-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathshell.nix
More file actions
38 lines (32 loc) · 740 Bytes
/
Copy pathshell.nix
File metadata and controls
38 lines (32 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
let
inherit (pkgs)
writeScript
stdenv
;
nixpkgs = <nixpkgs>;
config = {};
pkgs = import nixpkgs { inherit config; };
shellWrapper = writeScript "shell-wrapper" ''
#! ${stdenv.shell}
set -e
exec -a shell ${pkgs.fish}/bin/fish --login --interactive "$@"
'';
in stdenv.mkDerivation rec {
name = "nix-shell";
buildInputs = with pkgs; [
glibcLocales bashInteractive man
nix cacert curl utillinux coreutils
git jq yq-go tmux findutils gnumake
go gopls golangci-lint
];
shellHook = ''
export root=$(pwd)
export LANG="en_US.UTF-8"
export NIX_PATH="nixpkgs=${nixpkgs}"
if [ ! -z "$PS1" ]
then
export SHELL="${shellWrapper}"
exec "$SHELL"
fi
'';
}