anchor.diff:      maintainers = with maintainers; [ flokli idontgetoutmuch ];
       license     = licenses.bsd3;
     };
  -
   }
  
positive.code: { stdenv
  , cmake
  , fetchurl
  , python }:
  
  stdenv.mkDerivation rec {
    pname = "sundials";
    version = "4.1.0";
  
    nativeBuildInputs = [ cmake ];
    buildInputs = [ python ];
  
    src = fetchurl {
      url = "https://computation.llnl.gov/projects/${pname}/download/${pname}-${version}.tar.gz";
  
negative.code: 
    cmakeFlags = [
      "-DEXAMPLES_INSTALL_PATH=${placeholder "out"}/share/examples"
    ] ++ stdenv.lib.optionals (lapackSupport) [
      "-DSUNDIALS_INDEX_TYPE=int32_t"
      "-DLAPACK_ENABLE=ON"
      "-DLAPACK_LIBRARIES=${liblapackShared}/lib/liblapack${stdenv.hostPlatform.extensions.sharedLibrary};${liblapackShared}/lib/libblas${stdenv.hostPlatform.extensions.sharedLibrary}"
    ];
  
    doCheck = true;
  