about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/misc
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/misc')
-rw-r--r--nixpkgs/pkgs/applications/science/misc/root/default.nix13
-rw-r--r--nixpkgs/pkgs/applications/science/misc/tulip/default.nix26
2 files changed, 29 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/applications/science/misc/root/default.nix b/nixpkgs/pkgs/applications/science/misc/root/default.nix
index 6dc630181be2..993bc26bba28 100644
--- a/nixpkgs/pkgs/applications/science/misc/root/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/root/default.nix
@@ -2,6 +2,7 @@
 , lib
 , callPackage
 , fetchurl
+, fetchpatch
 , makeWrapper
 , cmake
 , coreutils
@@ -109,6 +110,18 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./sw_vers.patch
+    # glibc >=2.38 already has strlcat implemented.
+    # merged upstream, remove on next package bump.
+    (fetchpatch {
+      url = "https://github.com/root-project/root/commit/8fb0e35446ed67c9d56639b4708c8f05459b7f84.patch";
+      hash = "sha256-7EabmYanqlQsYSQsi+S9eWs1v1pY6MncopL420Y3D4w=";
+    })
+  ] ++ lib.optionals (python.pkgs.pythonAtLeast "3.11") [
+    # Fix build against Python 3.11
+    (fetchpatch {
+      url = "https://github.com/root-project/root/commit/484deb056dacf768aba4954073b41105c431bffc.patch";
+      hash = "sha256-4qur2e3SxMIPgOg4IjlvuULR2BObuP7xdvs+LmNT2/s=";
+    })
   ];
 
   preConfigure = ''
diff --git a/nixpkgs/pkgs/applications/science/misc/tulip/default.nix b/nixpkgs/pkgs/applications/science/misc/tulip/default.nix
index a2d3f3d9a2aa..947cc2c7c3bb 100644
--- a/nixpkgs/pkgs/applications/science/misc/tulip/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/tulip/default.nix
@@ -1,26 +1,32 @@
-{ fetchurl, lib, stdenv, libxml2, freetype, libGLU, libGL, glew
-, qtbase, wrapQtAppsHook, python3
-, cmake, libjpeg }:
+{ lib, stdenv, fetchurl, libxml2, freetype, libGLU, libGL, glew
+, qtbase, wrapQtAppsHook, autoPatchelfHook, python3
+, cmake, libjpeg, llvmPackages }:
 
 stdenv.mkDerivation rec {
   pname = "tulip";
-  version = "5.6.1";
+  version = "5.7.2";
 
   src = fetchurl {
-    url = "mirror://sourceforge/auber/${pname}-${version}_src.tar.gz";
-    sha256 = "1fy3nvgxv3igwc1d23zailcgigj1d0f2kkh7a5j24c0dyqz5zxmw";
+    url = "mirror://sourceforge/auber/tulip-${version}_src.tar.gz";
+    hash = "sha256-b+XFCS6Ks+EpwxgYFzWdRomfCpHXmZHXnrQM+ZSLN/0=";
   };
 
-  buildInputs = [ libxml2 freetype glew libGLU libGL libjpeg qtbase python3 ];
-  nativeBuildInputs = [ cmake wrapQtAppsHook ];
+  nativeBuildInputs = [ cmake wrapQtAppsHook ]
+    ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ];
+
+  buildInputs = [ libxml2 freetype glew libjpeg qtbase python3 ]
+    ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ]
+    ++ lib.optionals stdenv.isLinux [ libGLU libGL ];
 
   qtWrapperArgs = [ ''--prefix PATH : ${lib.makeBinPath [ python3 ]}'' ];
 
+  # error: format string is not a string literal (potentially insecure)
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-format-security";
+
   # FIXME: "make check" needs Docbook's DTD 4.4, among other things.
   doCheck = false;
 
   meta = {
-    broken = (stdenv.isLinux && stdenv.isAarch64);
     description = "A visualization framework for the analysis and visualization of relational data";
 
     longDescription =
@@ -36,6 +42,6 @@ stdenv.mkDerivation rec {
     license = lib.licenses.gpl3Plus;
 
     maintainers = [ ];
-    platforms = lib.platforms.gnu ++ lib.platforms.linux;  # arbitrary choice
+    platforms = lib.platforms.all;
   };
 }