Skip to content

Commit 5ec6580

Browse files
authored
Merge pull request #357 from akaihola/cachix-nixos-v17
Update `cachix/install-nix-action` to `v17`, downgrade to Python 3.9 on macOS Nix
2 parents ad6cde1 + a089f00 commit 5ec6580

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed

.github/workflows/python-package.yml

+17-10
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,31 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
os:
21-
- ubuntu-latest
22-
- macos-latest
20+
include:
21+
- os: ubuntu-latest
22+
python-version: python310
23+
- os: macos-latest
24+
python-version: python39
25+
# see https://github.com/cachix/install-nix-action/issues/135
2326
steps:
2427
- uses: actions/checkout@v3
2528
with:
2629
fetch-depth: 0
27-
- uses: cachix/install-nix-action@v16
30+
- uses: cachix/install-nix-action@v17
2831
with:
2932
nix_path: nixpkgs=channel:nixos-21.11
3033
- name: Run tests in nix-shell
3134
run: |
32-
nix-shell --pure --run '
33-
python -m venv venv
34-
source venv/bin/activate
35-
pip install -e '.[isort,test]'
36-
pytest
37-
' ./default.nix
35+
nix-shell \
36+
--pure \
37+
--argstr pythonVersion ${{ matrix.python-version }} \
38+
--run '
39+
python -m venv venv
40+
source venv/bin/activate
41+
pip install -e '.[isort,test]'
42+
pytest
43+
' \
44+
./default.nix
3845
3946
build:
4047

CHANGES.rst

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Fixed
2020
- Avoid memory leak from using ``@lru_cache`` on a method.
2121
- Handle files encoded with an encoding other than UTF-8 without an exception.
2222
- The GitHub Action now handles missing ``revision:`` correctly.
23+
- Update ``cachix/install-nix-action`` to ``v17`` to fix macOS build error.
24+
- Downgrade Python from 3.10 to 3.9 in the macOS NixOS build on GitHub due to a build
25+
error with Python 3.10.
2326

2427

2528
1.4.2_ - 2022-03-12

default.nix

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
with import <nixpkgs> {};
2-
stdenv.mkDerivation {
1+
{ pkgs ? import <nixpkgs> { }, pythonVersion ? "python310" }:
2+
(
3+
pkgs.stdenv.mkDerivation {
34
name = "darker-test";
4-
buildInputs = [ python310 git ];
5-
}
5+
buildInputs = [ pkgs.${pythonVersion} pkgs.git ];
6+
}
7+
)

0 commit comments

Comments
 (0)