about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libdynd
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libdynd')
-rw-r--r--nixpkgs/pkgs/development/libraries/libdynd/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libdynd/default.nix b/nixpkgs/pkgs/development/libraries/libdynd/default.nix
new file mode 100644
index 000000000000..8746ea42882c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdynd/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libdynd";
+  version = "0.7.2";
+
+  src = fetchFromGitHub {
+    owner = "libdynd";
+    repo = "libdynd";
+    rev = "v${version}";
+    sha256 = "0fkd5rawqni1cq51fmr76iw7ll4fmbahfwv4rglnsabbkylf73pr";
+  };
+
+  cmakeFlags = [
+    "-DDYND_BUILD_BENCHMARKS=OFF"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = builtins.toString [
+    # added to fix build with gcc7+
+    "-Wno-error=implicit-fallthrough"
+    "-Wno-error=nonnull"
+    "-Wno-error=tautological-compare"
+    "-Wno-error=class-memaccess"
+    "-Wno-error=parentheses"
+    "-Wno-error=deprecated-copy"
+    # Needed with GCC 12
+    "-Wno-error=deprecated-declarations"
+    "-Wno-error=maybe-uninitialized"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  outputs = [ "out" "dev" ];
+  outputDoc = "dev";
+
+  meta = with lib; {
+    description = "C++ dynamic ndarray library, with Python exposure";
+    homepage = "http://libdynd.org";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+  };
+}