From 5444e6468fcf7459d6d42c4c6b3b1298a1375037 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 9 Dec 2024 13:29:49 +0100 Subject: [PATCH 1/8] flake: upgrade NixOS 24.05 -> 24.11 and related changes to documentation and templates --- .github/workflows/update-flake-lock.yml | 1 + docs/index.rst | 2 +- docs/nixos-services/tutorials/archiver-appliance.rst | 4 ++-- docs/nixos-services/user-guides/pre-requisites.rst | 4 ++-- flake.lock | 8 ++++---- flake.nix | 2 +- pkgs/docs/default.nix | 2 +- templates/top/flake.nix | 2 +- 8 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/update-flake-lock.yml b/.github/workflows/update-flake-lock.yml index d35fb5d0..ae848f08 100644 --- a/.github/workflows/update-flake-lock.yml +++ b/.github/workflows/update-flake-lock.yml @@ -19,6 +19,7 @@ jobs: matrix: branch: - master + - nixos-24.11 - nixos-24.05 permissions: contents: write # to create branch diff --git a/docs/index.rst b/docs/index.rst index b21dc460..3740fb8b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -58,7 +58,7 @@ which is considered unstable, meaning breaking changes might happen without notice. EPNix also has release branches, -such as ``nixos-24.05``, +such as ``nixos-24.11``, tied to the nixpkgs release branches, where breaking changes are forbidden. diff --git a/docs/nixos-services/tutorials/archiver-appliance.rst b/docs/nixos-services/tutorials/archiver-appliance.rst index cd784c41..8386330b 100644 --- a/docs/nixos-services/tutorials/archiver-appliance.rst +++ b/docs/nixos-services/tutorials/archiver-appliance.rst @@ -61,8 +61,8 @@ Fill the file with these lines: { description = "Configuration for running Archiver Appliance in a VM"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; - inputs.epnix.url = "github:epics-extensions/EPNix/nixos-24.05"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + inputs.epnix.url = "github:epics-extensions/EPNix/nixos-24.11"; outputs = { self, nixpkgs, epnix }: { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { diff --git a/docs/nixos-services/user-guides/pre-requisites.rst b/docs/nixos-services/user-guides/pre-requisites.rst index fefca4c6..b3e57b3a 100644 --- a/docs/nixos-services/user-guides/pre-requisites.rst +++ b/docs/nixos-services/user-guides/pre-requisites.rst @@ -21,8 +21,8 @@ For example: { # ... - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; - + inputs.epnix.url = "github:epics-extensions/EPNix/nixos-24.05"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + + inputs.epnix.url = "github:epics-extensions/EPNix/nixos-24.11"; # ... outputs = { diff --git a/flake.lock b/flake.lock index e93abbfa..8742ff26 100644 --- a/flake.lock +++ b/flake.lock @@ -144,16 +144,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1735563628, - "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", + "lastModified": 1736549401, + "narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", + "rev": "1dab772dd4a68a7bba5d9460685547ff8e17d899", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 7ecdb450..6b61f5c0 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "A Nix flake containing EPICS-related modules and packages"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; bash-lib = { url = "github:minijackson/bash-lib"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/pkgs/docs/default.nix b/pkgs/docs/default.nix index c5578cf5..0386f767 100644 --- a/pkgs/docs/default.nix +++ b/pkgs/docs/default.nix @@ -92,7 +92,7 @@ in stdenvNoCC.mkDerivation { pname = "epnix-docs"; - version = "24.05"; + version = "24.11"; src = ../../docs; diff --git a/templates/top/flake.nix b/templates/top/flake.nix index fa1efd70..2a9c4366 100644 --- a/templates/top/flake.nix +++ b/templates/top/flake.nix @@ -2,7 +2,7 @@ description = "EPICS IOC for <...>"; inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.epnix.url = "github:epics-extensions/epnix/nixos-24.05"; + inputs.epnix.url = "github:epics-extensions/epnix/nixos-24.11"; # If you have a support module as a separate EPNix repository, # add it as an input here: From 1367883f084a50e8778dfeb9292816711b220fa0 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 9 Dec 2024 13:29:49 +0100 Subject: [PATCH 2/8] phoebus-client: reflect upstream changes in JDK OpenJFX argument --- pkgs/default.nix | 4 +++- pkgs/epnix/tools/phoebus/client/default.nix | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/default.nix b/pkgs/default.nix index 94ee79e8..8605c026 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -81,7 +81,9 @@ in pcas = callPackage ./epnix/tools/pcas {}; - phoebus = callPackage ./epnix/tools/phoebus/client {}; + phoebus = callPackage ./epnix/tools/phoebus/client { + openjfx = prev.openjfx21; + }; phoebus-alarm-server = callPackage ./epnix/tools/phoebus/alarm-server {}; phoebus-alarm-logger = callPackage ./epnix/tools/phoebus/alarm-logger {}; phoebus-archive-engine = callPackage ./epnix/tools/phoebus/archive-engine {}; diff --git a/pkgs/epnix/tools/phoebus/client/default.nix b/pkgs/epnix/tools/phoebus/client/default.nix index 5913b22c..47d3eecd 100644 --- a/pkgs/epnix/tools/phoebus/client/default.nix +++ b/pkgs/epnix/tools/phoebus/client/default.nix @@ -34,7 +34,7 @@ in (epnix.phoebus-setup-hook.override { jdk = jdk.override { enableJavaFX = true; - openjfx = openjfx.override { + openjfx_jdk = openjfx.override { withWebKit = true; }; }; From 9a6de055ae663e165774f4f0eb66d155e7395945 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 9 Dec 2024 13:29:49 +0100 Subject: [PATCH 3/8] phoebus-deps: update maven hashes --- pkgs/epnix/tools/phoebus/deps/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/epnix/tools/phoebus/deps/default.nix b/pkgs/epnix/tools/phoebus/deps/default.nix index d0d1f793..698071c4 100644 --- a/pkgs/epnix/tools/phoebus/deps/default.nix +++ b/pkgs/epnix/tools/phoebus/deps/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation { outputHashAlgo = "sha256"; outputHashMode = "recursive"; - outputHash = "sha256-tJMULUSwH0rCmNeKvesPqMVTBH3PQWInx6gzGxwdPwY="; + outputHash = "sha256-WPTw40NQQclYE3z283yVmd5epP01R0oMsI+1UuADGB4="; doCheck = false; From 9d427de3f96f2f4cda78bff3bc76500d78b4eade Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 9 Dec 2024 13:29:49 +0100 Subject: [PATCH 4/8] phoebus-olog: update maven hashes --- pkgs/epnix/tools/phoebus/olog/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/epnix/tools/phoebus/olog/default.nix b/pkgs/epnix/tools/phoebus/olog/default.nix index 67a02d52..77fedf5f 100644 --- a/pkgs/epnix/tools/phoebus/olog/default.nix +++ b/pkgs/epnix/tools/phoebus/olog/default.nix @@ -17,7 +17,7 @@ maven.buildMavenPackage rec { hash = "sha256-AHZowe4mmBpiFd5MMVRrnUHeTOJDwE6f0sZFUF+07lo="; }; - mvnHash = "sha256-xaoaoL1a9VP7e4HdI2YuOUPOADnMYlPesVbkhgLz3+M="; + mvnHash = "sha256-puUnYIbBVVXfoIcK9lkmBOH3TBfFAK+MeN8vsoxB8w0="; mvnParameters = "-Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pdeployable-jar -Dproject.build.outputTimestamp=1980-01-01T00:00:02Z"; nativeBuildInputs = [makeWrapper]; From e5502b75f51f34fd49293e4f2c1adae35ad74886 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Tue, 10 Dec 2024 16:35:49 +0100 Subject: [PATCH 5/8] flake: remove deprecated attributes this removes some warning messages when running `nix flake check` devShell.x86_64-linux is replaced by devShells.x86_64-linux.default defaultTemplate is replaced by templates.default --- flake.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/flake.nix b/flake.nix index 6b61f5c0..9caa8c68 100644 --- a/flake.nix +++ b/flake.nix @@ -71,8 +71,6 @@ ]; }; }; - - devShell = self.devShells.${system}.default; }; in # Not eachDefaultSystem right now, because `nix flake check` tries to @@ -126,7 +124,6 @@ }; templates.default = self.templates.top; - defaultTemplate = self.templates.default; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; }; From bff4669206d96dad8b633f46a77d6cd23b20edc0 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Tue, 10 Dec 2024 14:45:19 +0100 Subject: [PATCH 6/8] recceiver: disable for Python 3.12+, switch to Python 3.11 for NixOS module --- nixos/modules/channel-finder/recceiver.nix | 4 ++-- pkgs/epnix/tools/channel-finder/recceiver/default.nix | 5 +++++ pkgs/tests/default.nix | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/nixos/modules/channel-finder/recceiver.nix b/nixos/modules/channel-finder/recceiver.nix index 470bbba5..4bb8d81f 100644 --- a/nixos/modules/channel-finder/recceiver.nix +++ b/nixos/modules/channel-finder/recceiver.nix @@ -7,8 +7,8 @@ }: let cfg = config.services.recceiver; - pkg = pkgs.python3Packages.recceiver; - python = pkgs.python3.withPackages ( + pkg = pkgs.python311Packages.recceiver; + python = pkgs.python311.withPackages ( ps: [ ps.recceiver ps.twisted diff --git a/pkgs/epnix/tools/channel-finder/recceiver/default.nix b/pkgs/epnix/tools/channel-finder/recceiver/default.nix index 2ae4ba6a..c2ab1389 100644 --- a/pkgs/epnix/tools/channel-finder/recceiver/default.nix +++ b/pkgs/epnix/tools/channel-finder/recceiver/default.nix @@ -1,6 +1,7 @@ { epnixLib, buildPythonPackage, + pythonAtLeast, fetchFromGitHub, python, setuptools-scm, @@ -13,6 +14,10 @@ buildPythonPackage rec { version = "1.6"; pyproject = true; + # Should be fixed by https://github.com/ChannelFinder/recsync/pull/88 + # but the patch doesn't apply cleanly + disabled = pythonAtLeast "3.12"; + src = fetchFromGitHub { owner = "ChannelFinder"; repo = "recsync"; diff --git a/pkgs/tests/default.nix b/pkgs/tests/default.nix index 9181d16e..0810f831 100644 --- a/pkgs/tests/default.nix +++ b/pkgs/tests/default.nix @@ -6,5 +6,5 @@ {pkgs, ...}: { channelfinder-default-python = pkgs.python3Packages.channelfinder; mrf-driver-default-linux = pkgs.linuxPackages.mrf; - recceiver-default-python = pkgs.python3Packages.recceiver; + recceiver-default-python = pkgs.python311Packages.recceiver; } From a1f80868061ddeb882eb6ca21dcac8b72d65a583 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Tue, 17 Dec 2024 10:26:44 +0100 Subject: [PATCH 7/8] docs/conf.py: show full path of NixOS options in the TOC due to the upgrade to Sphinx 7.4.0, to have an acceptable option display in the TOC, instead of a flattened tree --- docs/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index ef68ff9c..d405a033 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -79,6 +79,10 @@ # -- Options for the Nix domain ---------------------------------------------- nix_options_json_files = ["./nixos-options.json"] +# Sphinx 7.4.0, the display of the hierarchy of objects in the TOC changed, +# and sphinxcontrib-nixdomain doesn't support it, +# so we just display the full option path in the TOC +nix_toc_display_full_path = True def nix_linkcode_resolve(path: str) -> str: From 7e4e29780b03870b7c5e2d91f920a17c88cb784b Mon Sep 17 00:00:00 2001 From: Minijackson Date: Tue, 10 Dec 2024 08:54:28 +0100 Subject: [PATCH 8/8] lewis: disable for Python 3.12+, move by default to Python 3.11 --- pkgs/default.nix | 5 ++++- pkgs/epnix/tools/lewis/default.nix | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/default.nix b/pkgs/default.nix index 8605c026..6976a830 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -76,7 +76,10 @@ in channel-finder-service = callPackage ./epnix/tools/channel-finder/service {}; - inherit (final.python3Packages) lewis pyepics; + # Lewis needs Python < 3.12 + inherit (final.python311Packages) lewis; + + inherit (final.python3Packages) pyepics; inherit (callPackage ./epnix/tools/lewis/lib.nix {}) mkLewisSimulator; pcas = callPackage ./epnix/tools/pcas {}; diff --git a/pkgs/epnix/tools/lewis/default.nix b/pkgs/epnix/tools/lewis/default.nix index 3d20404d..c5322bd2 100644 --- a/pkgs/epnix/tools/lewis/default.nix +++ b/pkgs/epnix/tools/lewis/default.nix @@ -1,6 +1,7 @@ { lib, buildPythonPackage, + pythonAtLeast, fetchFromGitHub, approvaltests, setuptools, @@ -18,6 +19,9 @@ buildPythonPackage rec { version = "1.3.1"; pyproject = true; + # Due to mrjob, which is needed by approvaltests + disabled = pythonAtLeast "3.12"; + src = fetchFromGitHub { owner = "ess-dmsc"; repo = "lewis";