Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0: Rewrite in Python #745

Closed
wants to merge 83 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
1d5e999
generating examples should depend on successful build
domenkozar Jul 21, 2023
a6f6525
unpin python 3.7 for cloudflare & fix build
domenkozar Jul 21, 2023
ddbd321
switch to nix ide with lsp support
domenkozar Jul 22, 2023
e91a0e1
ci: name the reinstallation step
domenkozar Jul 22, 2023
8d6e16f
Rewrite CLI in Python
domenkozar Jul 10, 2023
3d6e714
devenv inputs add <name> <url>
domenkozar Jul 27, 2023
89e527c
cli
domenkozar Jul 27, 2023
d705c61
devenv print-dev-env --json
figsoda Aug 14, 2023
cd11d43
Nix 2.17 + patches
domenkozar Aug 16, 2023
f4f156b
shellcheck
domenkozar Aug 19, 2023
5ff3752
Debug
domenkozar Aug 19, 2023
6a62d45
Disable macos-latest for now
domenkozar Aug 19, 2023
1e7ab0c
fix a few examples
domenkozar Aug 20, 2023
0b0b6e4
python: wrap to specify LD_LIBRARY_PATH
domenkozar Aug 21, 2023
984fdcc
bump nix
domenkozar Aug 21, 2023
280284b
python-poetry: debug LD_LIBRARY_PATH
domenkozar Aug 21, 2023
e5598ed
python: specify also DYLD_LIBRARY_PATH
domenkozar Aug 21, 2023
7210d0d
Add languages.python.manylinux.enable, pass libraries to the interpre…
domenkozar Aug 21, 2023
320ff0e
if there's no cachix defined, ignore the error
domenkozar Aug 24, 2023
1c0dd78
bump nix
domenkozar Aug 24, 2023
924e35b
fix $ devenv shell ls -la
domenkozar Sep 10, 2023
f0d8080
fix gc symlink
domenkozar Sep 10, 2023
7294a70
allow passing through arguments from run_nix to run_command
bobvanderlinden Sep 16, 2023
035e0da
only log command errors when logging is enabled
bobvanderlinden Sep 16, 2023
9065652
disable stderr and logging for cachix evaluation
bobvanderlinden Sep 16, 2023
28f5ded
add black pre-commit
bobvanderlinden Sep 16, 2023
0cef35a
format python files using black
bobvanderlinden Oct 6, 2023
8307385
[FEAT] Conditionally link devenv profile
penguincoder Oct 16, 2023
fdafea7
containers: correctly pass no registry case
domenkozar Oct 25, 2023
e5e7176
devenv processes stop: print PID
domenkozar Oct 31, 2023
f9b1e1f
normalize paths when root is /
mcdonc Dec 19, 2023
eb0ea25
Recreate Python venv and run pip install less often
mcdonc Dec 24, 2023
430456e
Recreate Python venv and run pip install less often
mcdonc Dec 24, 2023
e677841
container startup commands did not work due to quoting of args; we no…
mcdonc Dec 24, 2023
5e7e6e2
examples/python-poetry: use python libraries instead of packages
bobvanderlinden Jan 10, 2024
c89895e
to allow 'devenv processes stop' to stop processes we need to exec th…
mcdonc Jan 15, 2024
83d0579
add a --keep-going flag and handle ctrl-C during test running more gr…
mcdonc Jan 19, 2024
92438ed
until we get the env-venv nixpkgs stuff in a place we can use, we nee…
mcdonc Jan 19, 2024
a744481
some packages are now unfree
mcdonc Jan 19, 2024
391ac0e
some packages are now unfree
mcdonc Jan 19, 2024
0c58a1f
install rails via gem, add libyaml to make tests pass
mcdonc Jan 19, 2024
9d088cc
add comment about env-venv
mcdonc Jan 19, 2024
7ede7f1
comment
mcdonc Jan 19, 2024
172c294
make python-native-libs test pass
mcdonc Jan 19, 2024
6d3e951
make javascript test actually pass
mcdonc Jan 19, 2024
9801259
put user-defined libs first on LD_LIBRARY_PATH
mcdonc Jan 20, 2024
dea9928
add --exclude feature
mcdonc Jan 23, 2024
84d4cbe
make tests pass
mcdonc Jan 23, 2024
3c4f442
try to make these tests pass but they do not
mcdonc Jan 23, 2024
d23198d
make vault test pass in reality
mcdonc Jan 24, 2024
0a2265a
update poetry lock
mcdonc Jan 24, 2024
16951c5
pre-commit run -a
mcdonc Jan 24, 2024
e67b1ec
mark phoenix as broken
mcdonc Jan 24, 2024
4e6177b
print the command being run so we can run it by hand if it fails
mcdonc Jan 28, 2024
864e6e1
allow builtins (like set and if) within container exec commands
mcdonc Jan 28, 2024
4f7c5dc
Support allowBroken
jozuas Jan 28, 2024
a89c6da
update nix to 2.21 (dev)
domenkozar Feb 16, 2024
ca97806
search: fix missing default
domenkozar Feb 17, 2024
b86697c
Merge branch 'main' into python-rewrite
domenkozar Feb 17, 2024
72a2902
use self-hosted arm/linux
domenkozar Dec 14, 2023
32d2b55
fix cloudflare
domenkozar Feb 17, 2024
911b703
bump nix
domenkozar Feb 17, 2024
a8efe57
.devenv.flake.nix -> .devenv/flake.nix
domenkozar Feb 19, 2024
69e16ca
bump
domenkozar Feb 19, 2024
1a05e2b
bump
domenkozar Feb 20, 2024
e559c20
revert .devenv/flake.nix
domenkozar Feb 20, 2024
b6ec8cd
unpin python 3.7 for cloudflare & fix build
domenkozar Jul 21, 2023
fc9bec2
Rewrite CLI in Python
domenkozar Jul 10, 2023
d1340aa
devenv inputs add <name> <url>
domenkozar Jul 27, 2023
65351fb
cli
domenkozar Jul 27, 2023
42df623
Debug
domenkozar Aug 19, 2023
256b55c
Disable macos-latest for now
domenkozar Aug 19, 2023
84b5b1c
sync with upstream
mcdonc Feb 19, 2024
10db9bd
container devenv is now owned and procs started by a nonroot user
mcdonc Feb 20, 2024
b16cb52
remove shadowed function
mcdonc Feb 20, 2024
fd223f9
Merge pull request #983 from mcdonc/nonroot-containers-2
domenkozar Feb 20, 2024
765e6c1
format
domenkozar Feb 20, 2024
c72d2e3
debug
domenkozar Feb 20, 2024
170a5fc
fix ci?
domenkozar Feb 22, 2024
1efe0b2
bump nix
domenkozar Feb 22, 2024
deae4e8
containers are only supported on linux
domenkozar Feb 23, 2024
afeeece
don't rely on profiles on ci
domenkozar Feb 23, 2024
2ee4450
fix ci?
domenkozar Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"customizations": {
"vscode": {
"extensions": [
"bbenoist.Nix"
"jnoortheen.nix-ide"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ PATH_add "$devenv_bin/bin"
# External users should use `source_url` to load this file
source_env ./direnvrc

use devenv
use devenv
38 changes: 16 additions & 22 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v14
with:
name: devenv
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
nix profile remove '.*'
nix profile install --accept-flake-config .
- run: nix build
- name: Run tests
run: |
devenv ci
devenv shell devenv-run-tests
devenv search ncdu | grep "pkgs\.ncdu"
./result/bin/devenv ci
./result/bin/devenv shell devenv-run-tests
./result/bin/devenv search ncdu | grep "pkgs\.ncdu"
pin:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
Expand All @@ -51,7 +46,7 @@ jobs:
echo "examples=$json" >> $GITHUB_OUTPUT
examples:
name: ${{ matrix.example }} (${{ join(matrix.os) }})
needs: [generate-examples]
needs: [generate-examples, build]
strategy:
fail-fast: false
matrix:
Expand All @@ -69,16 +64,16 @@ jobs:
with:
name: devenv
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
nix profile remove '.*'
nix profile install --accept-flake-config . "nixpkgs#gawk"
- name: Disable package aliases
run: |
mkdir -p ~/.config/nixpkgs
echo '{ allowAliases = false; }' > ~/.config/nixpkgs/config.nix
- run: devenv shell devenv-test-example ${{ matrix.example }}
- run: |
nix build
./result/bin/devenv test ${{ matrix.example }}
direnv:
name: direnv (${{ join(matrix.os) }})
needs: build
strategy:
fail-fast: false
matrix:
Expand All @@ -95,15 +90,15 @@ jobs:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
mv ./examples/simple/devenv.yaml ./examples/simple/devenv.yaml.orig
awk '
nix run nixpkgs#gawk -- '
{ print }
/^inputs:$/ {
print " devenv:";
print " url: path:../../src/modules";
print " url: path:../../?dir=src/modules";
}
' ./examples/simple/devenv.yaml.orig > ./examples/simple/devenv.yaml
nix profile remove '.*'
nix profile install . 'nixpkgs#direnv'
nix profile install . 'nixpkgs#direnv'
mkdir -p ~/.config/direnv/
cat > ~/.config/direnv/direnv.toml << 'EOF'
[global]
Expand All @@ -113,6 +108,7 @@ jobs:
direnv exec ./examples/simple true
fish-zsh:
name: zsh/fish (${{ join(matrix.os) }})
needs: build
strategy:
fail-fast: false
matrix:
Expand All @@ -127,9 +123,7 @@ jobs:
with:
name: devenv
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build
- run: |
nix profile remove '.*'
nix profile install --accept-flake-config .
- run: |
nix shell nixpkgs#zsh -c zsh -c "$(which devenv) version"
nix shell nixpkgs#fish -c fish -c "$(which devenv) version"
nix shell nixpkgs#zsh -c zsh -c "./result/bin/devenv version"
nix shell nixpkgs#fish -c fish -c "./result/bin/devenv version"
13 changes: 7 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Nix & devenv
result
.env
.env.*
.devenv*
/.cache
/.pre-commit-config.yaml
/bin
/include
/lib
pyvenv.cfg
/.direnv
/.venv

# examples
examples/rust/app/target

# Python
/.venv
*.pyc
2 changes: 1 addition & 1 deletion build_cloudflare.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

set -xe
poetry install
poetry install --with docs
poetry run -- mkdocs build
1 change: 1 addition & 0 deletions devcontainer/nix-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set +e
if ! pidof nix-daemon > /dev/null 2>&1; then
start_ok=false
if [ "$(id -u)" = "0" ]; then
# shellcheck disable=SC1091
# shellcheck source=/dev/null
( . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh; /nix/var/nix/profiles/default/bin/nix-daemon > /tmp/nix-daemon.log 2>&1 ) &
# shellcheck disable=SC2181
Expand Down
86 changes: 43 additions & 43 deletions devenv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,27 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"lastModified": 1696426674,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"treeHash": "2addb7b71a20a25ea74feeaf5c2f6a6b30898ecb",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"treeHash": "2addb7b71a20a25ea74feeaf5c2f6a6b30898ecb",
"type": "github"
},
"original": {
Expand All @@ -32,11 +48,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"lastModified": 1705309234,
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"treeHash": "80a852cb0f5bf29497a20ca4f37ba97b0e85c721",
"type": "github"
},
"original": {
Expand All @@ -53,11 +69,11 @@
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"lastModified": 1703887061,
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
"treeHash": "2dd7f68f94467b298f778300ce0248117d6c500e",
"type": "github"
},
"original": {
Expand All @@ -66,52 +82,36 @@
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
"lastModified": 1633514407,
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
"type": "github"
},
"original": {
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
}
},
"nix": {
"inputs": {
"lowdown-src": "lowdown-src",
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1676545802,
"narHash": "sha256-EK4rZ+Hd5hsvXnzSzk2ikhStJnD63odF7SzsQ8CuSPU=",
"lastModified": 1708370782,
"owner": "domenkozar",
"repo": "nix",
"rev": "7c91803598ffbcfe4a55c44ac6d49b2cf07a527f",
"rev": "3b944df09a1d3606f094bd4b32c56846efc99ddf",
"treeHash": "401993a9735c08297eff0a593f6ac5adac68c8b9",
"type": "github"
},
"original": {
"owner": "domenkozar",
"ref": "relaxed-flakes",
"ref": "devenv-2.21",
"repo": "nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1701693815,
"narHash": "sha256-7BkrXykVWfkn6+c1EhFA3ko4MLi3gVG0p9G96PNnKTM=",
"lastModified": 1708373374,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "09ec6a0881e1a36c29d67497693a67a16f4da573",
"rev": "93e1c2d08467d1117ebac45689469613a9fe8453",
"treeHash": "a71be29ec9a1d906373bc8e8feac400a1bc378bf",
"type": "github"
},
"original": {
Expand All @@ -124,10 +124,10 @@
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"treeHash": "749c7b11668286627143f45b3f9078561a91980a",
"type": "github"
},
"original": {
Expand All @@ -139,23 +139,23 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1685801374,
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
"lastModified": 1708294118,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
"rev": "e0da498ad77ac8909a980f07eff060862417ccf7",
"treeHash": "6080d79e20d8f9fce719e518f10143595514df54",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"gitignore": "gitignore",
"nixpkgs": [
Expand All @@ -164,11 +164,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1700922917,
"narHash": "sha256-ej2fch/T584b5K9sk1UhmZF7W6wEfDHuoUYpFN8dtvM=",
"lastModified": 1708018599,
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "e5ee5c5f3844550c01d2131096c7271cec5e9b78",
"rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431",
"treeHash": "6b6519c2b58ad1e106d9633f0d1b490a70fc6980",
"type": "github"
},
"original": {
Expand All @@ -188,10 +188,10 @@
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"treeHash": "cce81f2a0f0743b2eb61bc2eb6c7adbe2f2c6beb",
"type": "github"
},
"original": {
Expand Down