Unverified Commit 7bc3647e authored by toonn's avatar toonn Committed by GitHub
Browse files

autodiff: init at 1.1.2 (#499339)

parents 1b739aed 98222aac
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  eigen,
  catch2_3,
  python3Packages,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "autodiff";
  version = "1.1.2";

  src = fetchFromGitHub {
    owner = "autodiff";
    repo = "autodiff";
    tag = "v${finalAttrs.version}";
    hash = "sha256-hKIufS5o5tfsbVchwTJxms1n5Im1iTfY3KGWD1s5g9M=";
  };

  nativeBuildInputs = [
    cmake
    eigen
    catch2_3
    python3Packages.pybind11
    python3Packages.distutils
  ];

  postPatch =
    # https://github.com/autodiff/autodiff/pull/391
    ''
      substituteInPlace python/package/CMakeLists.txt \
        --replace-fail PYTHON_EXECUTABLE Python_EXECUTABLE
    '';

  meta = {
    description = "Automatic differentiation made easier for C++";
    homepage = "https://github.com/autodiff/autodiff/tree/main";
    maintainers = [ lib.maintainers.athas ];
    license = lib.licenses.mit;
  };
})