Skip to content

Commit 745699a

Browse files
authored
Add devenv development files (#993)
* Add devenv config * Use Node 20 for now. * changelog
1 parent 052d42f commit 745699a

File tree

7 files changed

+246
-1
lines changed

7 files changed

+246
-1
lines changed

.envrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source_url "https://raw.githubusercontent.com/cachix/devenv/95f329d49a8a5289d31e0982652f7058a189bfca/direnvrc" "sha256-d+8cBpDfDBj41inrADaJt+bDWhOktwslgoP5YiGJ1v0="
2+
3+
use devenv

.github/workflows/devenv.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Devenv
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- "/devenv*"
8+
pull_request:
9+
branches: [ main ]
10+
paths-ignore:
11+
- "/devenv*"
12+
13+
jobs:
14+
test-nix-env:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: cachix/install-nix-action@v26
19+
- uses: cachix/cachix-action@v14
20+
with:
21+
name: devenv
22+
- name: Install devenv.sh
23+
run: nix profile install nixpkgs#devenv
24+
- name: Build the devenv shell and run any git hooks
25+
run: devenv test

.gitignore

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,11 @@ book
2020

2121
# Coverage
2222
coverage
23-
.nyc_output
23+
.nyc_output
24+
25+
# Devenv
26+
.devenv*
27+
devenv.local.nix
28+
29+
# direnv
30+
.direnv

changelog.d/993.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add devenv development files.

devenv.lock

+175
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
{
2+
"nodes": {
3+
"devenv": {
4+
"locked": {
5+
"dir": "src/modules",
6+
"lastModified": 1732585607,
7+
"owner": "cachix",
8+
"repo": "devenv",
9+
"rev": "a520f05c40ebecaf5e17064b27e28ba8e70c49fb",
10+
"treeHash": "18c0c037ca6ab98acc83bf17a1abefac00d77e65",
11+
"type": "github"
12+
},
13+
"original": {
14+
"dir": "src/modules",
15+
"owner": "cachix",
16+
"repo": "devenv",
17+
"type": "github"
18+
}
19+
},
20+
"fenix": {
21+
"inputs": {
22+
"nixpkgs": [
23+
"nixpkgs"
24+
],
25+
"rust-analyzer-src": "rust-analyzer-src"
26+
},
27+
"locked": {
28+
"lastModified": 1732689334,
29+
"owner": "nix-community",
30+
"repo": "fenix",
31+
"rev": "a8a983027ca02b363dfc82fbe3f7d9548a8d3dce",
32+
"type": "github"
33+
},
34+
"original": {
35+
"owner": "nix-community",
36+
"repo": "fenix",
37+
"type": "github"
38+
}
39+
},
40+
"flake-compat": {
41+
"flake": false,
42+
"locked": {
43+
"lastModified": 1732722421,
44+
"owner": "edolstra",
45+
"repo": "flake-compat",
46+
"rev": "9ed2ac151eada2306ca8c418ebd97807bb08f6ac",
47+
"treeHash": "89dbb8f9bb36708ea4455ee2225a9c60c950f2f7",
48+
"type": "github"
49+
},
50+
"original": {
51+
"owner": "edolstra",
52+
"repo": "flake-compat",
53+
"type": "github"
54+
}
55+
},
56+
"gitignore": {
57+
"inputs": {
58+
"nixpkgs": [
59+
"pre-commit-hooks",
60+
"nixpkgs"
61+
]
62+
},
63+
"locked": {
64+
"lastModified": 1709087332,
65+
"owner": "hercules-ci",
66+
"repo": "gitignore.nix",
67+
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
68+
"treeHash": "ca14199cabdfe1a06a7b1654c76ed49100a689f9",
69+
"type": "github"
70+
},
71+
"original": {
72+
"owner": "hercules-ci",
73+
"repo": "gitignore.nix",
74+
"type": "github"
75+
}
76+
},
77+
"nixpkgs": {
78+
"locked": {
79+
"lastModified": 1716977621,
80+
"owner": "cachix",
81+
"repo": "devenv-nixpkgs",
82+
"rev": "4267e705586473d3e5c8d50299e71503f16a6fb6",
83+
"treeHash": "6d9f1f7ca0faf1bc2eeb397c78a49623260d3412",
84+
"type": "github"
85+
},
86+
"original": {
87+
"owner": "cachix",
88+
"ref": "rolling",
89+
"repo": "devenv-nixpkgs",
90+
"type": "github"
91+
}
92+
},
93+
"nixpkgs-stable": {
94+
"locked": {
95+
"lastModified": 1732632634,
96+
"owner": "NixOS",
97+
"repo": "nixpkgs",
98+
"rev": "6f6076c37180ea3a916f84928cf3a714c5207a30",
99+
"treeHash": "1e15b0cb2baeffc40a2c957508052031b879c401",
100+
"type": "github"
101+
},
102+
"original": {
103+
"owner": "NixOS",
104+
"ref": "nixos-24.05",
105+
"repo": "nixpkgs",
106+
"type": "github"
107+
}
108+
},
109+
"nixpkgs-upstream": {
110+
"locked": {
111+
"lastModified": 1732350895,
112+
"owner": "NixOS",
113+
"repo": "nixpkgs",
114+
"rev": "0c582677378f2d9ffcb01490af2f2c678dcb29d3",
115+
"type": "github"
116+
},
117+
"original": {
118+
"owner": "NixOS",
119+
"ref": "nixos-24.11",
120+
"repo": "nixpkgs",
121+
"type": "github"
122+
}
123+
},
124+
"pre-commit-hooks": {
125+
"inputs": {
126+
"flake-compat": "flake-compat",
127+
"gitignore": "gitignore",
128+
"nixpkgs": [
129+
"nixpkgs"
130+
],
131+
"nixpkgs-stable": "nixpkgs-stable"
132+
},
133+
"locked": {
134+
"lastModified": 1732021966,
135+
"owner": "cachix",
136+
"repo": "pre-commit-hooks.nix",
137+
"rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
138+
"treeHash": "434cf02841a1faf9e53437604ffa4b9a92669bff",
139+
"type": "github"
140+
},
141+
"original": {
142+
"owner": "cachix",
143+
"repo": "pre-commit-hooks.nix",
144+
"type": "github"
145+
}
146+
},
147+
"root": {
148+
"inputs": {
149+
"devenv": "devenv",
150+
"fenix": "fenix",
151+
"nixpkgs": "nixpkgs",
152+
"nixpkgs-upstream": "nixpkgs-upstream",
153+
"pre-commit-hooks": "pre-commit-hooks"
154+
}
155+
},
156+
"rust-analyzer-src": {
157+
"flake": false,
158+
"locked": {
159+
"lastModified": 1732633904,
160+
"owner": "rust-lang",
161+
"repo": "rust-analyzer",
162+
"rev": "8d5e91c94f80c257ce6dbdfba7bd63a5e8a03fa6",
163+
"type": "github"
164+
},
165+
"original": {
166+
"owner": "rust-lang",
167+
"ref": "nightly",
168+
"repo": "rust-analyzer",
169+
"type": "github"
170+
}
171+
}
172+
},
173+
"root": "root",
174+
"version": 7
175+
}

devenv.nix

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{ pkgs, lib, config, inputs, ... }:
2+
let
3+
pkgs-upstream = import inputs.nixpkgs-upstream { system = pkgs.stdenv.system; };
4+
in
5+
{
6+
packages = [ pkgs.git pkgs.gcc pkgs.pkg-config pkgs.openssl ];
7+
8+
# https://devenv.sh/tests/
9+
enterTest = ''
10+
echo "Running tests"
11+
yarn
12+
'';
13+
14+
# https://devenv.sh/services/
15+
services.redis.enable = true;
16+
17+
# https://devenv.sh/languages/
18+
languages.typescript.enable = true;
19+
languages.javascript.yarn.enable = true;
20+
languages.javascript.enable = true;
21+
languages.javascript.package = pkgs-upstream.nodejs_20;
22+
languages.rust.enable = true;
23+
languages.rust.channel = "stable";
24+
}

devenv.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
inputs:
2+
nixpkgs:
3+
url: github:cachix/devenv-nixpkgs/rolling
4+
fenix:
5+
url: github:nix-community/fenix
6+
inputs:
7+
nixpkgs:
8+
follows: nixpkgs
9+
nixpkgs-upstream:
10+
url: github:NixOS/nixpkgs/nixos-24.11

0 commit comments

Comments
 (0)