about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2021-05-03 17:37:34 -0400
committerGitHub <noreply@github.com>2021-05-03 17:37:34 -0400
commit1cfcfccc6e37cca882055b461d79035450b5ef36 (patch)
tree43fb0f8b2b624a6a050eb229b21ff01e00152f0a /pkgs/applications/science
parentedeed0a71e953316f3415bc932459e472fa6ce07 (diff)
parentc846fa1674b625ed0105baae504f84704faea337 (diff)
Merge pull request #121411 from veprbl/pr/xfitter_darwin_fix
xfitter: fix for darwin
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/physics/xfitter/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/applications/science/physics/xfitter/default.nix b/pkgs/applications/science/physics/xfitter/default.nix
index d0a0585e69f18..4390826ccee02 100644
--- a/pkgs/applications/science/physics/xfitter/default.nix
+++ b/pkgs/applications/science/physics/xfitter/default.nix
@@ -39,9 +39,10 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ gfortran which ];
   buildInputs =
-    [ apfel apfelgrid applgrid blas lhapdf lapack mela root5 qcdnum libtirpc ]
+    [ apfel apfelgrid applgrid blas lhapdf lapack mela root5 qcdnum ]
     # pdf2yaml requires fmemopen and open_memstream which are not readily available on Darwin
     ++ lib.optional (!stdenv.isDarwin) libyaml
+    ++ lib.optional (stdenv.hostPlatform.libc == "glibc") libtirpc
     ;
   propagatedBuildInputs = [ lynx ];
 
@@ -49,8 +50,8 @@ stdenv.mkDerivation rec {
 
   hardeningDisable = [ "format" ];
 
-  NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
-  NIX_LDFLAGS = [ "-ltirpc" ];
+  NIX_CFLAGS_COMPILE = lib.optional (stdenv.hostPlatform.libc == "glibc") "-I${libtirpc.dev}/include/tirpc";
+  NIX_LDFLAGS = lib.optional (stdenv.hostPlatform.libc == "glibc") "-ltirpc";
 
   meta = with lib; {
     description = "The xFitter project is an open source QCD fit framework ready to extract PDFs and assess the impact of new data";