mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, gtest }:
|
|
stdenv.mkDerivation rec {
|
|
pname = "xsimd";
|
|
version = "8.1.0";
|
|
src = fetchFromGitHub {
|
|
owner = "xtensor-stack";
|
|
repo = "xsimd";
|
|
rev = version;
|
|
sha256 = "sha256-Aqs6XJkGjAjGAp0PprabSM4m+32M/UXpSHppCHdzaZk=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|