Skip to content

Commit af6171f

Browse files
authored
Merge pull request #841 from akaihola/fix-nixos-build
Fix NixOS build
2 parents 2a64f4f + 4729124 commit af6171f

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.github/workflows/python-package.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- build-wheel
6464
steps:
6565
- uses: actions/checkout@v4
66-
- uses: cachix/install-nix-action@v22
66+
- uses: cachix/install-nix-action@v31
6767
with:
6868
nix_path: nixpkgs=channel:nixos-unstable
6969
- name: Download wheel uploaded by the build-wheel job
@@ -73,13 +73,13 @@ jobs:
7373
nix-shell \
7474
--pure \
7575
--run '
76-
python -m venv venv
77-
source venv/bin/activate
7876
cert_file=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
7977
export NIX_SSL_CERT_FILE=$cert_file
80-
pip install "${{needs.build-wheel.outputs.wheel-path}}[dev]"
78+
uv venv
79+
uv pip install --group=dev "${{needs.build-wheel.outputs.wheel-path}}"
80+
uv export --only-group=dev | uv pip install --requirements=-
8181
# Run tests in installed package to avoid plugin import issue:
82-
pytest $(python -c "
82+
PY_IGNORE_IMPORTMISMATCH=1 uv run pytest $(python -c "
8383
import os, darker
8484
print(os.path.dirname(darker.__file__))
8585
")

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Internal
6464
- Switch from old defunct Bandit action to ``brunohaf/action-bandit``.
6565
- Format YAML files to satisfy yaml-lint and fix workflow syntax.
6666
- Use UV across all CI workflow actions, and enable caching of packages.
67+
- Update Nix action to v31 – fixes the build error.
6768

6869

6970
2.1.1_ - 2024-04-16

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(
33
pkgs.stdenv.mkDerivation {
44
name = "darker-test";
5-
buildInputs = [ pkgs.python311 pkgs.git ];
5+
buildInputs = [ pkgs.python311 pkgs.git pkgs.uv ];
66
shellHook = ''
77
export PY_IGNORE_IMPORTMISMATCH=1
88
'';

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ ruff = [
4343
"ruff>=0.0.292",
4444
]
4545
release = [
46-
"darkgray-dev-tools~=0.2.0",
46+
"darkgray-dev-tools~=0.3.0",
4747
]
4848

4949
[dependency-groups]
5050
dev = [
5151
"black>=22.3.0",
52-
"darkgray-dev-tools~=0.1.1",
52+
"darkgray-dev-tools~=0.3.0",
5353
"defusedxml>=0.7.1",
5454
"flynt>=0.76",
5555
"isort>=5.0.1",

0 commit comments

Comments
 (0)