Skip to content

Commit b529299

Browse files
authored
Merge pull request #1318 from flyingcircusio/os-python-previous-version
platform/packages: Keep around one earlier python version
2 parents a64580d + 46eeca8 commit b529299

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!--
2+
3+
A new changelog entry.
4+
5+
Delete placeholder items that do not apply. Empty sections will be removed
6+
automatically during release.
7+
8+
Leave the XX.XX as is: this is a placeholder and will be automatically filled
9+
correctly during the release and helps when backporting over multiple platform
10+
branches.
11+
12+
-->
13+
14+
15+
### NixOS XX.XX platform
16+
17+
- install python-3.11 by default in addition to the default python-3.12

nixos/platform/packages.nix

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
{
44
config = {
55

6-
environment.systemPackages = with pkgs; [
6+
environment.systemPackages = with pkgs;
7+
let
8+
previousPythonVersion = ver:
9+
"${lib.versions.major ver}${toString (lib.toInt(lib.versions.minor ver) - 1)}";
10+
previousPython = pkgs."python${previousPythonVersion pkgs.python3.version}";
11+
in [
712
apacheHttpd
813
atop
914
automake
@@ -52,6 +57,8 @@
5257
psmisc
5358
pwgen
5459
(python3.withPackages (ps: with ps; [ setuptools ]))
60+
# keep around at least one previous python version for upgrade compatibility
61+
(previousPython.withPackages (ps: with ps; [setuptools]))
5562
python3Packages.virtualenv
5663
rclone
5764
ripgrep

0 commit comments

Comments
 (0)