diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/xsimd')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/xsimd/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/xsimd/default.nix b/nixpkgs/pkgs/development/libraries/xsimd/default.nix new file mode 100644 index 000000000000..ec2d166ef580 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/xsimd/default.nix @@ -0,0 +1,41 @@ +{ lib, stdenv, fetchFromGitHub, cmake, gtest }: +stdenv.mkDerivation rec { + pname = "xsimd"; + version = "9.0.1"; + src = fetchFromGitHub { + owner = "xtensor-stack"; + repo = "xsimd"; + rev = version; + sha256 = "sha256-onALN6agtrHWigtFlCeefD9CiRZI4Y690XTzy2UDnrk="; + }; + + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ "-DBUILD_TESTS=ON" ]; + + doCheck = true; + nativeCheckInputs = [ gtest ]; + checkTarget = "xtest"; + GTEST_FILTER = + let + # Upstream Issue: https://github.com/xtensor-stack/xsimd/issues/456 + filteredTests = lib.optionals stdenv.hostPlatform.isDarwin [ + "error_gamma_test/*" + ]; + in + "-${builtins.concatStringsSep ":" filteredTests}"; + + # https://github.com/xtensor-stack/xsimd/issues/748 + postPatch = '' + substituteInPlace xsimd.pc.in \ + --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ + ''; + + meta = with lib; { + description = "C++ wrappers for SIMD intrinsics"; + homepage = "https://github.com/xtensor-stack/xsimd"; + license = licenses.bsd3; + maintainers = with maintainers; [ tobim ]; + platforms = platforms.all; + }; +} |