-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdevenv.nix
More file actions
151 lines (118 loc) · 3.43 KB
/
devenv.nix
File metadata and controls
151 lines (118 loc) · 3.43 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
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
146
147
148
149
150
151
{ pkgs, ... }:
# ── 1. pin rust-overlay ──────────────────────────────────────────────
let
rustOverlay = import (builtins.fetchTarball {
url = "https://github.com/oxalica/rust-overlay/archive/cb24c5cc207ba8e9a4ce245eedd2d37c3a988bc1.tar.gz";
sha256 = "096lirg41f5vgq9rrfg5b6vzyrya8v472v6cqfh1hjfi9ys20hc4";
});
pkgs' = pkgs.extend rustOverlay;
rustStable = pkgs'.rust-bin.stable.latest.default.override {
targets = [ "wasm32-unknown-unknown" "wasm32-wasip1" "wasm32-wasip2"];
extensions = [ "rust-src" "rust-analyzer-preview" ];
};
in
{
# https://devenv.sh/basics/
env = {
REGISTRY = "localhost:5000";
OPENWHISK_BASIC_AUTH = "23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP";
# NOTE(ereslibre): You will find this Base Image duplicated in
# multiple places; we know it's a pinned version that works to
# render PDF with our current version of headless_chrome. The
# places where this pinned version is duplicated is either because
# they don't allow to use environment variables as an input, or
# because they don't run within the devenv environment.
ALPINE_LAMBDA_BASE_IMAGE = "alpine:3.17@sha256:8fc3dacfb6d69da8d44e42390de777e48577085db99aa4e4af35f483eb08b989";
};
# https://devenv.sh/packages/
packages = with pkgs; [
# Binary Rust
rustStable
# AWS
(aws-sam-cli.overridePythonAttrs { doCheck = false; })
git
hasura-cli
reuse
openssl
glibc
openssh
postgresql_18
python3
openssh
# immudb
go
# To be able to use vim in the terminal
vim
# utility for search
ack
# docker utilities
dive
# wget and curl
wget
curl
# For frontend
yarn
nodejs_20
nodePackages.graphqurl
# For protocol buffers
protobuf
iputils
geckodriver
firefox
# to build the rug backend in strand/braid
gcc
m4
# count line numbers
scc
# for development of immudb local store
sqlite
# rust dependencies
cargo-watch
cargo-license
cargo-audit
wasm-pack
wasm-bindgen-cli
python3
python3Packages.virtualenvwrapper
# for parsing docker-compose.yml
yq
minio-client
# AI. Note, requires allowUnfree: true in devenv.yaml
claude-code
# for plugins
cargo-component
];
# https://devenv.sh/scripts/
scripts.hello.exec = "echo hello from $GREET";
enterShell = ''
set -a
source .devcontainer/.env
export LD_LIBRARY_PATH=${pkgs.openssl.out}/lib:$LD_LIBRARY_PATH
export PATH=/workspaces/step/packages/step-cli/rust-local-target/release:$PATH
set +a
export RUST_SRC_PATH=${rustStable}/lib/rustlib/src/rust/library
'';
languages.java = {
enable = true;
maven = {
enable = true;
};
};
# https://devenv.sh/git-hooks/
git-hooks.hooks = {
clippy.enable = false;
rustfmt.enable = false;
reuse = {
enable = false;
name = "Reuse license headers";
entry = "${pkgs.reuse}/bin/reuse lint";
pass_filenames = false;
};
};
# https://devenv.sh/integrations/dotenv/
# Enable usage of the .env file for setting env variables
# dotenv.enable = true;
# https://devenv.sh/processes/
# processes.ping.exec = "ping example.com";
# See full reference at https://devenv.sh/reference/options/
}