autodiff: init at 1.1.2 (#499339)

This commit is contained in:
toonn
2026-03-20 15:55:33 +00:00
committed by GitHub
+43
View File
@@ -0,0 +1,43 @@
{
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;
};
})