Unverified Commit b576bc26 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin Committed by GitHub
Browse files

apfel: 3.0.6 -> 3.1.0 (#273073)

parent d6a0fea3
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,8 +46,8 @@ message(STATUS "APFEL: APFEL_DOWNLOAD_PDFS=${APFEL_DOWNLOAD_PDFS}")
 # CONFIG SCRIPT ========================================================
 set(prefix ${CMAKE_INSTALL_PREFIX})
 set(exec_prefix "${prefix}")
-set(includedir "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
-set(libdir "${prefix}/${CMAKE_INSTALL_LIBDIR}")
+set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
+set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}")
 set(PACKAGE_VERSION "${apfel_VERSION}")
 configure_file("${PROJECT_SOURCE_DIR}/bin/apfel-config.in" "${PROJECT_BINARY_DIR}/bin/apfel-config")
 configure_file("${PROJECT_SOURCE_DIR}/bin/apfel.in" "${PROJECT_BINARY_DIR}/bin/apfel")
+41 −10
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, autoreconfHook, gfortran, lhapdf, python3, zlib }:
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gfortran
, lhapdf
, python3
, swig
, zlib
}:

stdenv.mkDerivation rec {
  pname = "apfel";
  version = "3.0.6";
  version = "3.1.0";

  src = fetchFromGitHub {
    owner = "scarrazza";
    repo = "apfel";
    rev = version;
    sha256 = "sha256-fRdJ+C92tEC75iUwP9Tmm/EswrlA52eUo5fBjfieH9o=";
    hash = "sha256-RXzHcLgitIk+6pINqcvpQv7QpDpAuFrOHKqjwZ0K5zI=";
  };

  # needed for aarch64-darwin
  nativeBuildInputs = [ autoreconfHook ];
  patches = [
    # https://github.com/scarrazza/apfel/pull/54
    ./cmake.patch
  ];

  buildInputs = [ gfortran lhapdf python3 zlib ];
  nativeBuildInputs = [
    cmake
    swig
  ];
  buildInputs = [
    gfortran
    lhapdf
    python3
    zlib
  ];

  enableParallelBuilding = true;
  cmakeFlags = [
    "-DAPFEL_DOWNLOAD_PDFS=OFF"
    "-DAPFEL_Python_SITEARCH=autoprefix"
  ];

  doCheck = true;
  nativeCheckInputs = [
    lhapdf.pdf_sets.NNPDF23_nlo_as_0118
    lhapdf.pdf_sets.NNPDF31_nnlo_as_0118
  ];

  env.NIX_CFLAGS_COMPILE = "-DAPFEL_VERSION=${version}";

  meta = with lib; {
    description = "A PDF Evolution Library";
    license     = licenses.gpl3Plus;
    homepage = "https://apfel.mi.infn.it/";
    platforms   = platforms.unix;
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ veprbl ];
    platforms = platforms.unix;
  };
}