Unverified Commit 343b0a22 authored by Austin Horstman's avatar Austin Horstman Committed by GitHub
Browse files

adolc: modernize; fix clang build (#354642)

parents 9d309607 b2f43234
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub }:
{
  lib,
  stdenv,
  fetchFromGitHub,
  llvmPackages,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "adolc";
  version = "2.7.2";

  src = fetchFromGitHub {
    owner = "coin-or";
    repo = "ADOL-C";
    sha256 = "1w0x0p32r1amfmh2lyx33j4cb5bpkwjr5z0ll43zi5wf5gsvckd1";
    rev = "releases/${version}";
    rev = "refs/tags/releases/${finalAttrs.version}";
    hash = "sha256-oU229SuOl/gHoRT8kiWfd5XFiByjeypgdVWFLMYFHfA=";
  };

  configureFlags = [ "--with-openmp-flag=-fopenmp" ];

  buildInputs = lib.optional stdenv.cc.isClang llvmPackages.openmp;

  meta = with lib; {
    description = "Automatic Differentiation of C/C++";
    homepage = "https://github.com/coin-or/ADOL-C";
    maintainers = [ maintainers.bzizou ];
    license = licenses.gpl2Plus;
  };
}
})