From fe7d494468a8df2432d1c1ff4f1824dfc9af71cf Mon Sep 17 00:00:00 2001 From: Phillip Seeber Date: Tue, 24 Oct 2023 17:15:00 +0200 Subject: [PATCH] haskellPackages.mpi-hs*: respect pkgs.mpi and make tests pass --- .../configuration-hackage2nix/main.yaml | 5 +++++ .../haskell-modules/configuration-nix.nix | 20 +++++++++++++++++++ .../haskell-modules/hackage-packages.nix | 5 +++++ 3 files changed, 30 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index cdb806c8c634..bdbefc534cd5 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -379,6 +379,11 @@ package-maintainers: - taffybar - arbtt - lentil + sheepforce: + - mpi-hs + - mpi-hs-store + - mpi-hs-cereal + - mpi-hs-binary shlok: - streamly-archive - streamly-lmdb diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 89a268a09a6e..037019be4de3 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1342,4 +1342,24 @@ self: super: builtins.intersectAttrs super { gi-webkit2 gi-webkit2webextension ; + + # Makes the mpi-hs package respect the choice of mpi implementation in Nixpkgs. + # Also adds required test dependencies for checks to pass + mpi-hs = + let validMpi = [ "openmpi" "mpich" "mvapich" ]; + mpiImpl = pkgs.mpi.pname; + disableUnused = with builtins; map disableCabalFlag (filter (n: n != mpiImpl) validMpi); + in lib.pipe + (super.mpi-hs_0_7_3_0.override { ompi = pkgs.mpi; }) + ( [ (addTestToolDepends [ pkgs.openssh pkgs.mpiCheckPhaseHook ]) ] + ++ disableUnused + ++ lib.optional (builtins.elem mpiImpl validMpi) (enableCabalFlag mpiImpl) + ); + inherit (lib.mapAttrs (_: addTestToolDepends + [ pkgs.openssh pkgs.mpiCheckPhaseHook ] + ) super) + mpi-hs-store + mpi-hs-cereal + mpi-hs-binary + ; } diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index c193f5e82d6c..525bf54ac5e7 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -205920,6 +205920,7 @@ self: { description = "MPI bindings for Haskell"; license = lib.licenses.asl20; badPlatforms = [ "aarch64-linux" ] ++ lib.platforms.darwin; + maintainers = [ lib.maintainers.sheepforce ]; }) {inherit (pkgs) mpich;}; "mpi-hs_0_7_3_0" = callPackage @@ -205941,6 +205942,7 @@ self: { license = lib.licenses.asl20; badPlatforms = [ "aarch64-linux" ] ++ lib.platforms.darwin; hydraPlatforms = lib.platforms.none; + maintainers = [ lib.maintainers.sheepforce ]; }) {ompi = null;}; "mpi-hs-binary" = callPackage @@ -205959,6 +205961,7 @@ self: { description = "MPI bindings for Haskell"; license = lib.licenses.asl20; badPlatforms = [ "aarch64-linux" ] ++ lib.platforms.darwin; + maintainers = [ lib.maintainers.sheepforce ]; }) {}; "mpi-hs-cereal" = callPackage @@ -205977,6 +205980,7 @@ self: { description = "MPI bindings for Haskell"; license = lib.licenses.asl20; badPlatforms = [ "aarch64-linux" ] ++ lib.platforms.darwin; + maintainers = [ lib.maintainers.sheepforce ]; }) {}; "mpi-hs-store" = callPackage @@ -205995,6 +205999,7 @@ self: { description = "MPI bindings for Haskell"; license = lib.licenses.asl20; badPlatforms = [ "aarch64-linux" ] ++ lib.platforms.darwin; + maintainers = [ lib.maintainers.sheepforce ]; }) {}; "mplayer-spot" = callPackage