-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshell.nix
145 lines (143 loc) · 2.86 KB
/
shell.nix
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{
pkgs ? import <nixpkgs> { },
py ? "312",
}:
pkgs.mkShell {
name = "nt2dev";
nativeBuildInputs = with pkgs; [
pkgs."python${py}"
pkgs."python${py}Packages".pip
black
pyright
taplo
vscode-langservers-extracted
zlib
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc
pkgs.zlib
];
shellHook = ''
echo "nt2dev nix-shell activated: $(which python)"
'';
}
# { pkgs, env }:
#
# let
# webPkgs = with pkgs; [
# nodejs_23
# vscode-langservers-extracted
# emmet-ls
# typescript-language-server
# taplo
# yaml-language-server
# markdown-oxide
# prettierd
# eslint_d
# mdformat
# ];
#
# goPkgs = with pkgs; [
# go
# gopls
# gotools
# hugo
# prettier-plugin-go-template
# ];
#
# cppPkgs = with pkgs; [
# zlib
# llvmPackages_19.libcxxClang
# clang-tools
# cmake
# neocmakelsp
# cmake-format
# ];
#
# glPkgs = with pkgs; [
# zlib
# glslls
# clang-tools
# ];
#
# pythonPkgs = with pkgs; [
# python312
# black
# pyright
# taplo
# vscode-langservers-extracted
# ];
#
# rocmPkgs = with pkgs; [
# rocmPackages.hipcc
# rocmPackages.rocminfo
# rocmPackages.rocm-smi
# ];
#
# asm = with pkgs; [
# nasm
# (import ../derivations/asm-lsp.nix { inherit pkgs; })
# ];
#
# in
# let
# nativeBuildInputs =
# [ ]
# ++ (if builtins.elem "web" env then webPkgs else [ ])
# ++ (if builtins.elem "go" env then goPkgs else [ ])
# ++ (if builtins.elem "cpp" env then cppPkgs else [ ])
# ++ (if builtins.elem "gl" env then glPkgs else [ ])
# ++ (if builtins.elem "python" env then pythonPkgs else [ ])
# ++ (if builtins.elem "rocm" env then rocmPkgs else [ ])
# ++ (if builtins.elem "asm" env then asm else [ ]);
# _vars = {
# LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (
# if ((builtins.elem "cpp" env) || (builtins.elem "gl" env)) then
# [
# pkgs.stdenv.cc.cc
# pkgs.zlib
# ]
# else
# [ ]
# );
# };
# envVars = builtins.listToAttrs (
# builtins.map (varName: {
# name = varName;
# value = _vars.${varName};
# }) (builtins.attrNames _vars)
# );
# preShellHook =
# ''
# RED='\033[0;31m'
# GREEN='\033[0;32m'
# BLUE='\033[0;34m'
# NC='\033[0m'
# export SHELL=$(which zsh)
# ''
# + (
# if builtins.elem "web" env then
# ''
# npm set prefix $HOME/.npm
# export PATH=$HOME/.npm/bin:$PATH
# ''
# else
# ""
# );
# postShellHook =
# { name, cmd }:
# ''
# echo ""
# echo -e "${name} nix-shell activated: ''\${BLUE}$(which ${cmd})''\${NC}"
# exec $SHELL
# '';
#
# in
# {
# inherit
# nativeBuildInputs
# envVars
# preShellHook
# postShellHook
# ;
# }