From 25b07fdd8f48dc3d5ea1b0fb18f2ca91298c27ac Mon Sep 17 00:00:00 2001 From: Xiangyan Sun Date: Sat, 2 May 2026 09:22:23 -0700 Subject: [PATCH] gtmathematics: init at 8.2 --- pkgs/by-name/gt/gtmathematics/package.nix | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pkgs/by-name/gt/gtmathematics/package.nix diff --git a/pkgs/by-name/gt/gtmathematics/package.nix b/pkgs/by-name/gt/gtmathematics/package.nix new file mode 100644 index 000000000000..dcce92bf7d76 --- /dev/null +++ b/pkgs/by-name/gt/gtmathematics/package.nix @@ -0,0 +1,46 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, +}: +let + GTE_VERSION_MAJOR = "8"; + GTE_VERSION_MINOR = "2"; +in + +stdenv.mkDerivation (finalAttrs: { + pname = "gtmathematics"; + version = "${GTE_VERSION_MAJOR}.${GTE_VERSION_MINOR}"; + + strictDeps = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "davideberly"; + repo = "GeometricTools"; + tag = "GTE-version-${finalAttrs.version}"; + hash = "sha256-OmWcD3T9OoLd7WDyqCyCLl5TeNnLBm9xV7DJxnb4hJc="; + }; + + sourceRoot = "source/GTE/Mathematics"; + + nativeBuildInputs = [ + cmake + ]; + + cmakeFlags = [ + (lib.cmakeFeature "GTE_VERSION_MAJOR" "${GTE_VERSION_MAJOR}") + (lib.cmakeFeature "GTE_VERSION_MINOR" "${GTE_VERSION_MINOR}") + ]; + + meta = { + description = "A collection of source code for computing in the fields of mathematics, geometry, graphics, image analysis and physics."; + homepage = "https://www.geometrictools.com"; + license = lib.licenses.boost; + maintainers = with lib.maintainers; [ + wishstudio + ]; + platforms = lib.platforms.all; + }; +})