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