From 9129804230a3a4272731609f6418b876ba450575 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 7 Nov 2017 20:26:34 +0200 Subject: [PATCH] gnu: psm: Only use as an input on supported-systems. Syntax help supplied by bavier@member.fsf.org * gnu/packages/linux.scm (libfabric)[inputs]: Only use psm as an input on systems where psm is supported. * gnu/packages/mpi.scm (openmpi)[inputs]: Same. --- gnu/packages/linux.scm | 5 ++++- gnu/packages/mpi.scm | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 5398906de4..ce7c220e0b 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4394,7 +4394,10 @@ (define-public libfabric (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv")))) (build-system gnu-build-system) (inputs `(("rdma-core" ,rdma-core) - ("psm" ,psm) + ,@(match (%current-system) + ((member (package-supported-systems psm)) + `(("psm" ,psm))) + (_ `())) ("libnl" ,libnl))) (home-page "https://ofiwg.github.io/libfabric/") (synopsis "Open Fabric Interfaces") diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index 5054fa9d9c..d9a2094bea 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2014 Ian Denhardt ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2017 Dave Love +;;; Copyright © 2017 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,7 +38,8 @@ (define-module (gnu packages mpi) #:use-module (gnu packages perl) #:use-module (gnu packages ncurses) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages valgrind)) + #:use-module (gnu packages valgrind) + #:use-module (ice-9 match)) (define-public hwloc (package @@ -126,7 +128,10 @@ (define-public openmpi `(("hwloc" ,hwloc "lib") ("gfortran" ,gfortran) ("libfabric" ,libfabric) - ("psm" ,psm) + ,@(match (%current-system) + ((member (package-supported-systems psm)) + `(("psm" ,psm))) + (_ `())) ("rdma-core" ,rdma-core) ("valgrind" ,valgrind))) (native-inputs