Commit b410bb28 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin
Browse files

sherpa: build with CMake, fix SHERPA_LIBRARY_PATH

parent 9a44a719
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -2,13 +2,11 @@
  lib,
  stdenv,
  fetchFromGitLab,
  autoconf,
  gfortran,
  cmake,
  gfortran,
  libzip,
  pkg-config,
  lhapdf,
  autoPatchelfHook,
  patchelf,
}:

stdenv.mkDerivation rec {
@@ -27,19 +25,20 @@ stdenv.mkDerivation rec {
  '';

  nativeBuildInputs = [
    autoconf
    gfortran
    cmake
    pkg-config
    gfortran
  ]
  ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
  ++ lib.optionals stdenv.hostPlatform.isLinux [ patchelf ];

  buildInputs = [
    libzip
    lhapdf
  ];

  enableParallelBuilding = true;
  cmakeFlags = [
    # Needed to initialize a valid SHERPA_LIBRARY_PATH
    "-DCMAKE_INSTALL_LIBDIR=lib"
  ];

  preFixup =
    lib.optionalString stdenv.hostPlatform.isDarwin ''