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"; 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..679e34e7 100644 --- a/ioc/tests/default.nix +++ b/ioc/tests/default.nix @@ -14,14 +14,16 @@ 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... #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 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"; 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]; 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/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 = 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"; - }; -}