1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "libdynd";
10 version = "0.7.2";
11
12 src = fetchFromGitHub {
13 owner = "libdynd";
14 repo = "libdynd";
15 rev = "v${version}";
16 sha256 = "0fkd5rawqni1cq51fmr76iw7ll4fmbahfwv4rglnsabbkylf73pr";
17 };
18
19 cmakeFlags = [
20 "-DDYND_BUILD_BENCHMARKS=OFF"
21 ];
22
23 env.NIX_CFLAGS_COMPILE = builtins.toString [
24 # added to fix build with gcc7+
25 "-Wno-error=implicit-fallthrough"
26 "-Wno-error=nonnull"
27 "-Wno-error=tautological-compare"
28 "-Wno-error=class-memaccess"
29 "-Wno-error=parentheses"
30 "-Wno-error=deprecated-copy"
31 # Needed with GCC 12
32 "-Wno-error=deprecated-declarations"
33 "-Wno-error=maybe-uninitialized"
34 ];
35
36 nativeBuildInputs = [ cmake ];
37
38 outputs = [
39 "out"
40 "dev"
41 ];
42 outputDoc = "dev";
43
44 meta = with lib; {
45 description = "C++ dynamic ndarray library, with Python exposure";
46 homepage = "http://libdynd.org";
47 license = licenses.bsd2;
48 platforms = platforms.linux;
49 };
50}