Skip to content

Nix shell updates (Nixpkgs 2024-02-23, QMK CLI 1.1.5) #23143

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

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

sigprof
Copy link
Contributor

@sigprof sigprof commented Feb 24, 2024

Description

Major updates for the Nix shell environment:

  • Nixpkgs updated to the 2024-02-23 snapshot. This change brings support for the aarch64-darwin and aarch64-linux hosts, and the AVR toolchain now comes from the official binary cache instead of requiring a time-consuming local build from sources.

  • QMK CLI updated to 1.1.5 (the most recent release at the moment).

  • Other Python modules are updated to their recent versions.

  • Dropped some obsolete build-time dependencies from util/nix/pyproject.toml (those dependencies were added there to work around build problems caused by the old Nixpkgs snapshot, and are no longer needed after updating nixpkgs and poetry2nix to the current versions).

  • Updated util/nix/sources.nix from the current Niv version.

  • Fixed the qmk setup command failure ([Bug] ModuleNotFoundError: No module named 'qmk_cli' inside nix-shell #20704); although that command is mostly unneeded with the nix-shell workflow, it could still be used to set up the global QMK CLI configuration.

  • Pinned clang-tools to major version 11, so that clang-format (and therefore qmk format-c) would produce the same results as the QMK CI environment (which currently uses Docker images based on Debian bullseye with clang-format 11.0).

Toolchain version changes:

  • avr-binutils: 2.35.1 → 2.40
  • avr-gcc: 8.4.0 → 8.5.0 (still using 8.x versions, because 13.x is not yet avalable for all supported architectures in Nixpkgs)
  • avr-libc: 2.0.0 → 2.1.0
  • gcc-arm-embedded: 10-2020-q4-major → 12.3.rel1

Version changes for other supporting packages:

  • avrdude: 6.3 → 7.3
  • dfu-util: 0.10 → 0.11
  • git: 2.30.1 → 2.43.0
  • python3: 3.8.8 → 3.11.7
  • teensy-loader-cli: 2.1.20191110 → 2.2

Version changes for Python modules:

  • argcomplete: 2.0.0 → 3.2.2
  • atomicwrites: 1.4.1 → none
  • attrs: 22.1.0 → 23.2.0
  • colorama: 0.4.5 → 0.4.6
  • editables: 0.3 → none
  • flake8: 5.0.4 → 7.0.0
  • flit-core: 3.7.1 → none
  • hatch-fancy-pypi-readme: 22.3.0 → none
  • hatch-vcs: 0.2.0 → none
  • hatchling: 1.8.0 → none
  • hid: 1.0.5 → 1.0.6
  • importlib-resources: 5.9.0 → none
  • importlib-metadata: none → 7.0.1
  • iniconfig: 1.1.1 → none
  • jsonschema: 4.14.0 → 4.21.1
  • jsonschema-specifications: none → 2023.12.1
  • milc: 1.6.6 → 1.8.0
  • nose2: 0.12.0 → 0.14.1
  • packaging: 21.3 → none
  • pathspec: 0.9.0 → none
  • pep8-naming: 0.13.2 → 0.13.3
  • pillow: 9.2.0 → 10.2.0
  • pkgutil-resolve-name: 1.3.10 → none
  • pluggy: 1.0.0 → none
  • platformdirs: none → 4.2.0
  • poetry-core: 1.0.8 → none
  • py: 1.11.0 → none
  • pycodestyle: 2.9.1 → 2.11.1
  • pyflakes: 2.5.0 → 3.2.0
  • pygments: 2.13.0 → 2.17.2
  • pyparsing: 3.0.9 → none
  • pyrsistent: 0.18.1 → none
  • pytest: 7.1.2 → none
  • qmk: 1.1.1 → 1.1.5
  • setuptools-scm: 7.0.5 → none
  • referencing: none → 0.33.0
  • rpds-py: none → 0.18.0
  • termcolor: 1.1.0 → 2.4.0
  • typing-extensions: 4.3.0 → none
  • types-colorama: none → 0.4.15.20240205
  • yapf: 0.32.0 → 0.40.2
  • zipp: 3.8.1 → 3.17.0

The branch was tested on x86_64-linux, x86_64-darwin and aarch64-darwin; not actually tested on aarch64-linux (GitHub still does not provide such runners); also tested locally on x86_64-linux (NixOS 23.11).

Cc: @purcell @AstridYu @andresilva @evils

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Major updates for the Nix shell environment:

  - Nixpkgs updated to the 2024-02-23 snapshot.  This change brings
    support for the `aarch64-darwin` and `aarch64-linux` hosts, and the
    AVR toolchain now comes from the official binary cache instead of
    requiring a time-consuming local build from sources.

  - QMK CLI updated to 1.1.5 (the most recent release at the moment).

  - Other Python modules are updated to their recent versions.

  - Fixed the `qmk setup` command failure (although that command is
    mostly unneeded with the `nix-shell` workflow, it could still be
    used to set up the global QMK CLI configuration).

  - Pinned `clang-tools` to major version 11, so that `clang-format`
    (and therefore `qmk format-c`) would produce the same results as the
    QMK CI environment (which currently uses Docker images based on
    Debian bullseye with `clang-format` 11.0).

Toolchain version changes:
  - `avr-binutils`: 2.35.1 → 2.40
  - `avr-gcc`: 8.4.0 → 8.5.0 (still using 8.x versions, because 13.x is
    not yet avalable for all supported architectures in Nixpkgs)
  - `avr-libc`: 2.0.0 → 2.1.0
  - `gcc-arm-embedded`: 10-2020-q4-major → 12.3.rel1

Version changes for other supporting packages:
  - `avrdude`: 6.3 → 7.3
  - `dfu-util`: 0.10 → 0.11
  - `git`: 2.30.1 → 2.43.0
  - `python3`: 3.8.8 → 3.11.7
  - `teensy-loader-cli`: 2.1.20191110 → 2.2

Version changes for Python modules:
  - `argcomplete`: 2.0.0 → 3.2.2
  - `atomicwrites`: 1.4.1 → none
  - `attrs`: 22.1.0 → 23.2.0
  - `colorama`: 0.4.5 → 0.4.6
  - `editables`: 0.3 → none
  - `flake8`: 5.0.4 → 7.0.0
  - `flit-core`: 3.7.1 → none
  - `hatch-fancy-pypi-readme`: 22.3.0 → none
  - `hatch-vcs`: 0.2.0 → none
  - `hatchling`: 1.8.0 → none
  - `hid`: 1.0.5 → 1.0.6
  - `importlib-resources`: 5.9.0 → none
  - `importlib-metadata`: none → 7.0.1
  - `iniconfig`: 1.1.1 → none
  - `jsonschema`: 4.14.0 → 4.21.1
  - `jsonschema-specifications`: none → 2023.12.1
  - `milc`: 1.6.6 → 1.8.0
  - `nose2`: 0.12.0 → 0.14.1
  - `packaging`: 21.3 → none
  - `pathspec`: 0.9.0 → none
  - `pep8-naming`: 0.13.2 → 0.13.3
  - `pillow`: 9.2.0 → 10.2.0
  - `pkgutil-resolve-name`: 1.3.10 → none
  - `pluggy`: 1.0.0 → none
  - `platformdirs`: none → 4.2.0
  - `poetry-core`: 1.0.8 → none
  - `py`: 1.11.0 → none
  - `pycodestyle`: 2.9.1 → 2.11.1
  - `pyflakes`: 2.5.0 → 3.2.0
  - `pygments`: 2.13.0 → 2.17.2
  - `pyparsing`: 3.0.9 → none
  - `pyrsistent`: 0.18.1 → none
  - `pytest`: 7.1.2 → none
  - `qmk`: 1.1.1 → 1.1.5
  - `setuptools-scm`: 7.0.5 → none
  - `referencing`: none → 0.33.0
  - `rpds-py`: none → 0.18.0
  - `termcolor`: 1.1.0 → 2.4.0
  - `typing-extensions`: 4.3.0 → none
  - `types-colorama`: none → 0.4.15.20240205
  - `yapf`: 0.32.0 → 0.40.2
  - `zipp`: 3.8.1 → 3.17.0
@synecdokey
Copy link

synecdokey commented Feb 24, 2024

Ran without a hitch on my M1 machine, thanks for doing this! This definitely solves #22348

Copy link

@evils evils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me

changes all look like cleanup to me
but i didn't scrutinize it beyond that

Copy link
Contributor

@purcell purcell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

Copy link
Member

@tzarc tzarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weak approval, going with merge due to SMEs giving thumbs-up.

@tzarc tzarc merged commit 34a113c into qmk:develop Feb 26, 2024
haunt98 added a commit to haunt98/qmk_keymaps that referenced this pull request Feb 27, 2024
peepeetee pushed a commit to peepeetee/qmk_firmware that referenced this pull request Mar 12, 2024
@sigprof sigprof deleted the nix-shell-updates-develop branch April 26, 2024 06:46
Chris4942 pushed a commit to Chris4942/qmk_firmware that referenced this pull request Jun 15, 2024
nuess0r pushed a commit to nuess0r/qmk_firmware that referenced this pull request Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants