From 0171314f656718dcd165caa36de38e7e257a5b41 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Wed, 14 Jun 2023 11:15:23 +0200 Subject: [PATCH 1/7] flake: Upgrade nixpkgs 22.11 -> 23.05 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/5b7cd5c39befee629be284970415b6eb3b0ff000' (2023-03-28) → 'github:NixOS/nixpkgs/bb8b5735d6f7e06b9ddd27de115b0600c1ffbdb4' (2023-06-11) --- flake.lock | 8 ++++---- flake.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index a7ea8619..b3c2619a 100644 --- a/flake.lock +++ b/flake.lock @@ -53,16 +53,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1679966490, - "narHash": "sha256-k0jV+y1jawE6w4ZvKgXDNg4+O9NNtcaWwzw8gufv0b4=", + "lastModified": 1694499547, + "narHash": "sha256-R7xMz1Iia6JthWRHDn36s/E248WB1/je62ovC/dUVKI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5b7cd5c39befee629be284970415b6eb3b0ff000", + "rev": "e5f018cf150e29aac26c61dac0790ea023c46b24", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.11", + "ref": "nixos-23.05", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 47ed831b..7b603475 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "A Nix flake containing EPICS-related modules and packages"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; inputs.bash-lib = { url = "github:minijackson/bash-lib"; inputs.nixpkgs.follows = "nixpkgs"; From 933337ba9122915e1d35130e8168ba9d4e0ecc5d Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 3 Jul 2023 10:34:30 +0200 Subject: [PATCH 2/7] epics-base: fix compilation due to GNUMake 4.4 upgrade --- pkgs/epnix/epics-base/default.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/epnix/epics-base/default.nix b/pkgs/epnix/epics-base/default.nix index a784ccf1..770de2ed 100644 --- a/pkgs/epnix/epics-base/default.nix +++ b/pkgs/epnix/epics-base/default.nix @@ -8,12 +8,12 @@ fetchpatch, version, hash, - readline, local_config_site ? {}, local_release ? {}, }: with lib; let older = versionOlder version; + atLeast = versionAtLeast version; generateConf = (epnixLib.formats.make {}).generate; @@ -37,11 +37,19 @@ in inherit hash; }; - patches = optionals (older "7.0.5") [ - # Support "undefine MYVAR" in convertRelease.pl - # Fixed by commit 79d7ac931502e1c25b247a43b7c4454353ac13a6 - ./handle-make-undefine-variable.patch - ]; + patches = + (optionals (atLeast "7.0.0") [ + # From: https://github.com/epics-base/epics-base/pull/395 + (fetchpatch { + url = "https://github.com/epics-base/epics-base/commit/d87fd0db0124faf450cff93226ae6a2cc02f02bf.patch"; + hash = "sha256-BQWFOPCfRjSowDSAbqe8ClqEWT1OtfbgRh4k5jmAjpU="; + }) + ]) + ++ (optionals (older "7.0.5") [ + # Support "undefine MYVAR" in convertRelease.pl + # Fixed by commit 79d7ac931502e1c25b247a43b7c4454353ac13a6 + ./handle-make-undefine-variable.patch + ]); # "build" as in Nix terminology (the build machine) build_config_site = From 8c486b8d7a50e58c41949d6bff4523c2ef9c2dd0 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 3 Jul 2023 10:35:00 +0200 Subject: [PATCH 3/7] nixos/tests/phoebus-olog: allow SSPL license for MongoDB The MongoDB upgrade is not FOSS --- nixos/tests/phoebus/olog.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/tests/phoebus/olog.nix b/nixos/tests/phoebus/olog.nix index 6aed8d68..7adca693 100644 --- a/nixos/tests/phoebus/olog.nix +++ b/nixos/tests/phoebus/olog.nix @@ -19,6 +19,9 @@ # not open-source. But as we're using it run tests, not exposing # any service, this should be fine. "elasticsearch" + + # MongoDB also uses the SSPL. + "mongodb" ]; networking.firewall.allowedTCPPorts = [8181]; From e48abd8544cbcd4933d85d5a4cb3e27fb2fb665d Mon Sep 17 00:00:00 2001 From: Minijackson Date: Fri, 15 Sep 2023 16:00:36 +0200 Subject: [PATCH 4/7] ioc/tests/cross: fix package name --- ioc/tests/cross/default.nix | 3 ++- ioc/tests/default.nix | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ioc/tests/cross/default.nix b/ioc/tests/cross/default.nix index 575ace39..92010bf1 100644 --- a/ioc/tests/cross/default.nix +++ b/ioc/tests/cross/default.nix @@ -1,6 +1,7 @@ { pkgs, crossSystem, + system-name, ... }: let inherit (pkgs) epnixLib; @@ -19,7 +20,7 @@ emulator = pkgs.lib.replaceStrings ["\""] ["\\\""] (hostPlatform.emulator pkgs); in pkgs.nixosTest { - name = "cross-for-${system}"; + name = "cross-for-${system-name}"; meta.maintainers = with epnixLib.maintainers; [minijackson]; nodes.machine = {}; diff --git a/ioc/tests/default.nix b/ioc/tests/default.nix index 62ca3c65..13b0513a 100644 --- a/ioc/tests/default.nix +++ b/ioc/tests/default.nix @@ -14,7 +14,7 @@ with pkgs.lib; in nameValuePair "cross-for-${system-name}" - (import ./cross/default.nix (args // {inherit crossSystem;})); + (import ./cross/default.nix (args // {inherit crossSystem system-name;})); systemsToCheck = with systems.examples; [ # Maybe one day... From c84c1a5052e7976739a0e8aad52efff947dad535 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Fri, 29 Sep 2023 09:09:45 +0200 Subject: [PATCH 5/7] ioc/tests: disable ppc64 tests for now due to Qemu issues --- ioc/tests/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ioc/tests/default.nix b/ioc/tests/default.nix index 13b0513a..679e34e7 100644 --- a/ioc/tests/default.nix +++ b/ioc/tests/default.nix @@ -21,7 +21,9 @@ with pkgs.lib; #mingwW64 # IFC1410 - ppc64 + # This is commented out now, due to an issue from Qemu + # The tests don't pass, but they run on actual hardware + #ppc64 powernv From 020e39e8772acaa23a70a925186ca26aa2bc1ac8 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Fri, 13 Oct 2023 11:27:21 +0200 Subject: [PATCH 6/7] nixos/archiver-appliance: use JNA dependncy from nixpkgs --- nixos/modules/archiver-appliance.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nixos/modules/archiver-appliance.nix b/nixos/modules/archiver-appliance.nix index c92d8999..85407f00 100644 --- a/nixos/modules/archiver-appliance.nix +++ b/nixos/modules/archiver-appliance.nix @@ -288,9 +288,8 @@ in { "${pkgs.epnix.mariadb_jdbc}/share/java/mariadb-java-client.jar" # Dependencies of the mariadb connector, for UNIX sockets: - # TODO: use the nixpkgs version when we switch to NixOS 23.05 - "${pkgs.epnix.jna}/share/java/jna.jar" - "${pkgs.epnix.jna}/share/java/jna-platform.jar" + "${pkgs.jna}/share/java/jna.jar" + "${pkgs.jna}/share/java/jna-platform.jar" ]; user = "archappl"; From e954c8540ce8da90a872c1ea1e3ccb5fe23396be Mon Sep 17 00:00:00 2001 From: Minijackson Date: Fri, 13 Oct 2023 11:27:50 +0200 Subject: [PATCH 7/7] pkgs/jna: remove we now use the JNA from nixpkgs --- pkgs/default.nix | 1 - pkgs/epnix/tools/jna/default.nix | 44 -------------------------------- 2 files changed, 45 deletions(-) delete mode 100644 pkgs/epnix/tools/jna/default.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 09777425..18717718 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -55,7 +55,6 @@ with prev; # Other utilities - jna = callPackage ./epnix/tools/jna {}; mariadb_jdbc = callPackage ./epnix/tools/mariadb_jdbc {}; # EPNix specific packages diff --git a/pkgs/epnix/tools/jna/default.nix b/pkgs/epnix/tools/jna/default.nix deleted file mode 100644 index 515bff76..00000000 --- a/pkgs/epnix/tools/jna/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -# TODO: remove once we switch to NixOS 23.05 -{ - stdenv, - lib, - epnixLib, - fetchFromGitHub, - ant, - jdk8, -}: -stdenv.mkDerivation rec { - pname = "jna"; - version = "5.13.0"; - - src = fetchFromGitHub { - owner = "java-native-access"; - repo = pname; - rev = version; - hash = "sha256-EIOVmzQcnbL1NmxAaUVCMDvs9wpKqhP5iHAPoBVs3ho="; - }; - - nativeBuildInputs = [ant jdk8]; - - buildPhase = '' - runHook preBuild - rm -r dist # remove prebuilt files - ant dist - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - install -Dm444 -t $out/share/java dist/jna{,-platform}.jar - runHook postInstall - ''; - - meta = with lib; { - inherit (src.meta) homepage; - description = "Java Native Access"; - license = with licenses; [lgpl21 asl20]; - maintainers = with epnixLib.maintainers; [minijackson]; - platforms = platforms.linux; - changelog = "https://github.com/java-native-access/jna/blob/${version}/CHANGES.md"; - }; -}