about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/biology/megahit/default.nix12
-rw-r--r--pkgs/applications/science/biology/svaba/default.nix7
-rw-r--r--pkgs/applications/science/chemistry/openmolcas/default.nix6
-rw-r--r--pkgs/applications/science/logic/cryptoverif/default.nix4
-rw-r--r--pkgs/applications/science/logic/stp/default.nix8
-rw-r--r--pkgs/applications/science/misc/openmvg/default.nix53
-rw-r--r--pkgs/applications/science/misc/root/default.nix12
-rw-r--r--pkgs/applications/science/physics/xfitter/default.nix2
8 files changed, 87 insertions, 17 deletions
diff --git a/pkgs/applications/science/biology/megahit/default.nix b/pkgs/applications/science/biology/megahit/default.nix
index 7f054a51d5e05..5fa9420bc87cb 100644
--- a/pkgs/applications/science/biology/megahit/default.nix
+++ b/pkgs/applications/science/biology/megahit/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, zlib }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, zlib }:
 
 stdenv.mkDerivation rec {
   pname    = "megahit";
@@ -11,6 +11,16 @@ stdenv.mkDerivation rec {
     sha256 = "1r5d9nkdmgjsbrpj43q9hy3s8jwsabaz3ji561v18hy47v58923c";
   };
 
+  patches = [
+    # Fix gcc-13 build failure:
+    #   https://github.com/voutcn/megahit/pull/366
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/voutcn/megahit/commit/4cb2f793503087163bda8592222f105f27e33e66.patch";
+      hash = "sha256-b5mhzif+OPcMjmg+BnaUc5CB6Acn/KTBOJEw+WYEhbs=";
+    })
+  ];
+
   nativeBuildInputs = [ cmake ];
   buildInputs = [ zlib ];
 
diff --git a/pkgs/applications/science/biology/svaba/default.nix b/pkgs/applications/science/biology/svaba/default.nix
index 441c7ed6dcc3d..d36c4b668ec3b 100644
--- a/pkgs/applications/science/biology/svaba/default.nix
+++ b/pkgs/applications/science/biology/svaba/default.nix
@@ -14,6 +14,13 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ zlib bzip2 xz ];
 
+  postPatch = ''
+    # Fix gcc-13 build failure due to missing includes
+    sed -e '1i #include <cstdint>' -i \
+      SeqLib/src/non_api/Histogram.h \
+      src/svaba/Histogram.h
+  '';
+
   # Workaround build failure on -fno-common toolchains like upstream
   # gcc-10. Otherwise build fails as:
   #   ld: ./libfml.a(rle.o):/build/source/SeqLib/fermi-lite/rle.h:33: multiple definition of
diff --git a/pkgs/applications/science/chemistry/openmolcas/default.nix b/pkgs/applications/science/chemistry/openmolcas/default.nix
index 0aeb01c2916b5..cefe83446662e 100644
--- a/pkgs/applications/science/chemistry/openmolcas/default.nix
+++ b/pkgs/applications/science/chemistry/openmolcas/default.nix
@@ -13,7 +13,7 @@
 , libxc
 , makeWrapper
 , gsl
-, boost175
+, boost180
 , autoPatchelfHook
   # Note that the CASPT2 module is broken with MPI
   # See https://gitlab.com/Molcas/OpenMolcas/-/issues/169
@@ -93,7 +93,7 @@ stdenv.mkDerivation {
     armadillo
     libxc
     gsl.dev
-    boost175
+    boost180
   ] ++ lib.optionals enableMpi [
     mpi
     globalarrays
@@ -155,7 +155,7 @@ stdenv.mkDerivation {
     homepage = "https://gitlab.com/Molcas/OpenMolcas";
     maintainers = [ maintainers.markuskowa ];
     license = with licenses; [ lgpl21Only bsd3 ];
-    platforms = [ "x86_64-linux" ];
+    platforms = [ "aarch64-linux" "x86_64-linux" ];
     mainProgram = "pymolcas";
   };
 }
diff --git a/pkgs/applications/science/logic/cryptoverif/default.nix b/pkgs/applications/science/logic/cryptoverif/default.nix
index 66ba807c8dd81..5c15b8a17241f 100644
--- a/pkgs/applications/science/logic/cryptoverif/default.nix
+++ b/pkgs/applications/science/logic/cryptoverif/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "cryptoverif";
-  version = "2.07";
+  version = "2.08pl1";
 
   src = fetchurl {
     url    = "http://prosecco.gforge.inria.fr/personal/bblanche/cryptoverif/cryptoverif${version}.tar.gz";
-    hash   = "sha256-GXXql4+JZ396BM6W2I3kN0u59xos7UCAtzR0IjMIETY=";
+    hash = "sha256-rmORSZuhds9W2WpNgYf4AJM2jgEUPoJit4G64qLqj5w=";
   };
 
   /* Fix up the frontend to load the 'default' cryptoverif library
diff --git a/pkgs/applications/science/logic/stp/default.nix b/pkgs/applications/science/logic/stp/default.nix
index 4646f7178f560..fb41ea07f5a15 100644
--- a/pkgs/applications/science/logic/stp/default.nix
+++ b/pkgs/applications/science/logic/stp/default.nix
@@ -18,6 +18,14 @@ stdenv.mkDerivation rec {
     ./stdint.patch
   ];
 
+  postPatch = ''
+    # Upstream fix for gcc-13 support:
+    #   https://github.com/stp/stp/pull/462
+    # Can't apply it as is as patch context changed in ither patches.
+    # TODO: remove me on 2.4 release
+    sed -e '1i #include <cstdint>' -i include/stp/AST/ASTNode.h
+  '';
+
   buildInputs = [ boost zlib minisat cryptominisat python3 ];
   nativeBuildInputs = [ cmake bison flex perl ];
   preConfigure = ''
diff --git a/pkgs/applications/science/misc/openmvg/default.nix b/pkgs/applications/science/misc/openmvg/default.nix
index c5434c8699093..5cf4dc4377521 100644
--- a/pkgs/applications/science/misc/openmvg/default.nix
+++ b/pkgs/applications/science/misc/openmvg/default.nix
@@ -1,34 +1,63 @@
-{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, cereal, openmp
-, libjpeg ? null
-, zlib ? null
-, libpng ? null
-, eigen ? null
-, libtiff ? null
+{ lib, stdenv, fetchFromGitHub, pkg-config, cmake
+, cereal
 , ceres-solver
+, clp
+, coin-utils
+, eigen
+, lemon-graph
+, libjpeg
+, libpng
+, libtiff
+, nix-update-script
+, openmp
+, osi
+, zlib
 , enableShared ? !stdenv.hostPlatform.isStatic
 , enableExamples ? false
 , enableDocs ? false }:
 
 stdenv.mkDerivation rec {
-  version = "unstable-2022-12-30";
+  version = "2.1";
   pname = "openmvg";
 
   src = fetchFromGitHub {
     owner = "openmvg";
     repo = "openmvg";
-    rev = "e1bbfe801986cd7171f36443a1573b0f69f3702d";
-    sha256 = "sha256-DngfmejNFw5pogTo7Ec5aUey2LUQIojvJybLmtCfvVY=";
-    fetchSubmodules = true;
+    rev = "v${version}";
+    hash = "sha256-vG+tW9Gl/DAUL8DeY+rJVDJH/oMPH3XyZMUgzjtwFv0=";
   };
 
-  buildInputs = [ libjpeg zlib libpng eigen libtiff cereal openmp ceres-solver ];
+  # Pretend we checked out the dependency submodules
+  postPatch = ''
+    mkdir src/dependencies/cereal/include
+  '';
+
+  buildInputs = [
+    cereal
+    ceres-solver
+    clp
+    coin-utils
+    eigen
+    lemon-graph
+    libjpeg
+    libpng
+    libtiff
+    openmp
+    osi
+    zlib
+  ];
 
   nativeBuildInputs = [ cmake pkg-config ];
 
+  # flann is missing because the lz4 dependency isn't propagated: https://github.com/openMVG/openMVG/issues/1265
   cmakeFlags = [
     "-DOpenMVG_BUILD_EXAMPLES=${if enableExamples then "ON" else "OFF"}"
     "-DOpenMVG_BUILD_DOC=${if enableDocs then "ON" else "OFF"}"
     "-DTARGET_ARCHITECTURE=generic"
+    "-DCLP_INCLUDE_DIR_HINTS=${lib.getDev clp}/include"
+    "-DCOINUTILS_INCLUDE_DIR_HINTS=${lib.getDev coin-utils}/include"
+    "-DLEMON_INCLUDE_DIR_HINTS=${lib.getDev lemon-graph}/include"
+    "-DOSI_INCLUDE_DIR_HINTS=${lib.getDev osi}/include"
   ] ++ lib.optional enableShared "-DOpenMVG_BUILD_SHARED=ON";
 
   cmakeDir = "./src";
@@ -41,6 +70,8 @@ stdenv.mkDerivation rec {
   # Without hardeningDisable, certain flags are passed to the compile that break the build (primarily string format errors)
   hardeningDisable = [ "all" ];
 
+  passthru.updateScript = nix-update-script { };
+
   meta = {
     broken = stdenv.isDarwin && stdenv.isx86_64;
     description = "A library for computer-vision scientists and targeted for the Multiple View Geometry community";
diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix
index c5534c18d7bbb..7c9d6f5cb0a66 100644
--- a/pkgs/applications/science/misc/root/default.nix
+++ b/pkgs/applications/science/misc/root/default.nix
@@ -2,6 +2,7 @@
 , lib
 , callPackage
 , fetchurl
+, fetchpatch
 , makeWrapper
 , cmake
 , coreutils
@@ -109,6 +110,17 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./sw_vers.patch
+
+    # compatibility with recent XRootD
+    # https://github.com/root-project/root/pull/13752
+    (fetchpatch {
+      url = "https://github.com/root-project/root/commit/3d3cda6c520791282298782189cdb8ca07ace4b9.diff";
+      hash = "sha256-O3aXzrOEQiPjZgbAj9TL6Wt/adN1kKFwjooeaFRyT4I=";
+    })
+    (fetchpatch {
+      url = "https://github.com/root-project/root/commit/6e7798e62dbed1ffa8b91a180fa5a080b7c04ba3.diff";
+      hash = "sha256-47/J631DBnVlvM1Pm9iicKXDKAqN8v9hjAstQuHmH8Q=";
+    })
   ];
 
   preConfigure = ''
diff --git a/pkgs/applications/science/physics/xfitter/default.nix b/pkgs/applications/science/physics/xfitter/default.nix
index 1852ef3ff1c8e..77b57e08e2bbe 100644
--- a/pkgs/applications/science/physics/xfitter/default.nix
+++ b/pkgs/applications/science/physics/xfitter/default.nix
@@ -47,6 +47,8 @@ stdenv.mkDerivation rec {
   env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "-I${libtirpc.dev}/include/tirpc";
   NIX_LDFLAGS = lib.optional (stdenv.hostPlatform.libc == "glibc") "-ltirpc";
 
+  hardeningDisable = [ "format" ];
+
   # workaround wrong library IDs
   postInstall = lib.optionalString stdenv.isDarwin ''
     ln -sv "$out/lib/xfitter/"* "$out/lib/"