-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdevenv.nix
More file actions
90 lines (89 loc) · 2.44 KB
/
devenv.nix
File metadata and controls
90 lines (89 loc) · 2.44 KB
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
{ pkgs, lib, inputs, config, ... }: {
# Language-specific topions
options = {
profile = lib.mkOption {
type = lib.types.enum [ "android" "ruby" "php" "c" "cplusplus" "basic" ];
default = "basic";
description = "Development profile to use";
};
};
config = {
android = {
enable = lib.mkIf (config.profile == "android") true;
};
languages = {
python = {
enable = true;
venv.enable = true;
version = "3.13";
};
javascript = {
enable = true;
package = pkgs.nodejs_24;
npm.enable = true;
};
java = {
enable = true;
jdk.package = pkgs.jdk23;
};
ruby = {
enable = lib.mkIf (config.profile == "ruby") true;
version = "4.0.0";
};
c = {
enable = lib.mkIf (config.profile == "c") true;
};
cplusplus = {
enable = lib.mkIf (config.profile == "cplusplus") true;
};
scala = {
enable = true;
sbt.enable = true;
};
php = {
enable = lib.mkIf (config.profile == "php") true;
extensions = [
"openssl"
"zip"
];
packages = {
composer = pkgs.phpPackages.composer;
};
};
};
packages = [
pkgs.nodejs_24
pkgs.python313Full
(pkgs.python313.withPackages (ps: [ ps.pip ps.setuptools ]))
pkgs.sbt
pkgs.php
];
# Useful features
devcontainer.enable = true;
difftastic.enable = true;
# Compile atom and plugins
# Setup the latest cdxgen
enterShell = ''
set -e
mkdir -p /tmp/empty-cache
export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8 --enable-native-access=ALL-UNNAMED"
sudo npm install --cache /tmp/empty-cache --prefer-online -g @cyclonedx/cdxgen
cdxgen --version
python3 --version
python3 -m pip install atom-tools
sbt clean stage createDistribution publishLocal
cd wrapper/nodejs
bash build.sh
sudo npm install --cache /tmp/empty-cache --prefer-online -g .
sudo npm install --cache /tmp/empty-cache --prefer-online -g @appthreat/atom-parsetools
cd ../..
which atom
which astgen
which phpastgen
which rbastgen
which scalasem
which atom-tools
'';
# Tasks
};
}