about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorMauricio Collares <mauricio@collares.org>2024-03-26 19:29:01 +0100
committerGitHub <noreply@github.com>2024-03-26 19:29:01 +0100
commitd3fd6364f9045a0dc25cfbbb2dd41d819b514e60 (patch)
tree29f6ad3b9f218bdf4674cc7622f32de622e3b6f4 /pkgs/development
parentf6618fa3d5edda68a2a6fb0672806ba3b8799a62 (diff)
parente7f6ab70bf066810ba780ae5ad92334dfac72f3c (diff)
Merge pull request #298957 from Feyorsh/sage-dep
sage: fix dependencies on Darwin/Clang16
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/fflas-ffpack/default.nix1
-rw-r--r--pkgs/development/libraries/flint/3.nix8
-rw-r--r--pkgs/development/libraries/fplll/default.nix8
-rw-r--r--pkgs/development/libraries/givaro/default.nix5
-rw-r--r--pkgs/development/libraries/linbox/default.nix8
-rw-r--r--pkgs/development/libraries/science/math/flintqs/default.nix40
-rw-r--r--pkgs/development/libraries/science/math/m4rie/default.nix5
-rw-r--r--pkgs/development/libraries/science/math/rubiks/default.nix47
-rw-r--r--pkgs/development/libraries/tachyon/default.nix1
-rw-r--r--pkgs/development/python-modules/fpylll/default.nix4
10 files changed, 76 insertions, 51 deletions
diff --git a/pkgs/development/libraries/fflas-ffpack/default.nix b/pkgs/development/libraries/fflas-ffpack/default.nix
index 25bab6645e076..65c29f9319ceb 100644
--- a/pkgs/development/libraries/fflas-ffpack/default.nix
+++ b/pkgs/development/libraries/fflas-ffpack/default.nix
@@ -50,7 +50,6 @@ stdenv.mkDerivation rec {
   doCheck = true;
 
   meta = with lib; {
-    broken = stdenv.isDarwin;
     description = "Finite Field Linear Algebra Subroutines";
     mainProgram = "fflas-ffpack-config";
     license = licenses.lgpl21Plus;
diff --git a/pkgs/development/libraries/flint/3.nix b/pkgs/development/libraries/flint/3.nix
index b8b8c2d8ec7d3..60321984d3165 100644
--- a/pkgs/development/libraries/flint/3.nix
+++ b/pkgs/development/libraries/flint/3.nix
@@ -1,5 +1,6 @@
 { lib
 , stdenv
+, fetchpatch
 , fetchurl
 , gmp
 , mpfr
@@ -24,6 +25,13 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-ezEaAFA6hjiB64F32+uEMi8pOZ89fXLzsaTJuh1XlLQ=";
   };
 
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/flintlib/flint/commit/e7d005c369754243cba32bd782ea2a5fc874fde5.diff";
+      hash = "sha256-IqEtYEpNVXfoTeerh/0ig+eDqUpAlGdBB3uO8ShYh3o=";
+    })
+  ];
+
   nativeBuildInputs = [
     autoconf
     automake
diff --git a/pkgs/development/libraries/fplll/default.nix b/pkgs/development/libraries/fplll/default.nix
index ab74a09d07952..5e2268199496b 100644
--- a/pkgs/development/libraries/fplll/default.nix
+++ b/pkgs/development/libraries/fplll/default.nix
@@ -1,5 +1,6 @@
 { lib, stdenv
 , fetchFromGitHub
+, fetchpatch
 , pkg-config
 , gettext
 , autoreconfHook
@@ -18,6 +19,13 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-taSS7jpVyjVfNe6kSuUDXMD2PgKmtG64V5MjZyQzorI=";
   };
 
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/fplll/fplll/commit/317cf70893eebfb2625da12e5377189908c36240.diff";
+      sha256 = "sha256-GbYSolBgv/he4QzjuRFdg93wHJABVHvA9x3PjpJTSRE=";
+    })
+  ];
+
   nativeBuildInputs = [
     pkg-config
     gettext
diff --git a/pkgs/development/libraries/givaro/default.nix b/pkgs/development/libraries/givaro/default.nix
index a7b1eaa43831a..aca83ec4b8d68 100644
--- a/pkgs/development/libraries/givaro/default.nix
+++ b/pkgs/development/libraries/givaro/default.nix
@@ -25,6 +25,11 @@ stdenv.mkDerivation rec {
       url = "https://github.com/linbox-team/givaro/commit/c7744bb133496cd7ac04688f345646d505e1bf52.patch";
       hash = "sha256-aAA5o8Va10v0Pqgcpx7qM0TAZiNQgXoR6N9xecj7tDA=";
     })
+    (fetchpatch {
+      name = "clang-16.patch";
+      url = "https://github.com/linbox-team/givaro/commit/a81d44b3b57c275bcb04ab00db79be02561deaa2.patch";
+      hash = "sha256-sSk+VWffoEjZRTJcHRISLHPyW6yuvI1u8knBOfxNUIE=";
+    })
   ];
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/linbox/default.nix b/pkgs/development/libraries/linbox/default.nix
index 0997513f5a515..4d0158dbcbe3c 100644
--- a/pkgs/development/libraries/linbox/default.nix
+++ b/pkgs/development/libraries/linbox/default.nix
@@ -1,5 +1,6 @@
 { lib, stdenv
 , fetchFromGitHub
+, fetchpatch
 , autoreconfHook
 , givaro
 , pkg-config
@@ -23,6 +24,13 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-mW84a98KPLqcHMjX3LIYTmVe0ngUdz6RJLpoDaAqKU8=";
   };
 
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/linbox-team/linbox/commit/4be26e9ef0eaf36a9909e5008940e8bf7dc625b6.patch";
+      sha256 = "PX0Tik7blXOV2vHUq92xMxaADkNoNGiax4qrjQyGK6U=";
+    })
+  ];
+
   nativeBuildInputs = [
     autoreconfHook
     pkg-config
diff --git a/pkgs/development/libraries/science/math/flintqs/default.nix b/pkgs/development/libraries/science/math/flintqs/default.nix
deleted file mode 100644
index c5426ed67fc7f..0000000000000
--- a/pkgs/development/libraries/science/math/flintqs/default.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{ lib, stdenv
-, fetchFromGitHub
-, autoreconfHook
-, gmp
-}:
-
-stdenv.mkDerivation rec {
-  version = "1.0";
-  pname = "flintqs";
-
-  src = fetchFromGitHub {
-    owner = "sagemath";
-    repo = "FlintQS";
-    rev = "v${version}";
-    sha256 = "1f0lnayz6j6qgasx8pbq61d2fqam0wwhsmh6h15l4vq58l1vvbwj";
-  };
-
-  preAutoreconf = ''
-    touch ChangeLog
-  '';
-
-  buildInputs = [
-    gmp
-  ];
-
-  nativeBuildInputs = [
-    autoreconfHook
-  ];
-
-  doCheck = true;
-
-  meta = with lib; {
-    description = "Highly optimized multi-polynomial quadratic sieve for integer factorization";
-    homepage = "https://github.com/sagemath/FlintQS";
-    license = with licenses; [ gpl2 ];
-    maintainers = teams.sage.members;
-    mainProgram = "QuadraticSieve";
-    platforms = platforms.all;
-  };
-}
diff --git a/pkgs/development/libraries/science/math/m4rie/default.nix b/pkgs/development/libraries/science/math/m4rie/default.nix
index 214f27046527e..ac513297f1590 100644
--- a/pkgs/development/libraries/science/math/m4rie/default.nix
+++ b/pkgs/development/libraries/science/math/m4rie/default.nix
@@ -21,6 +21,9 @@ stdenv.mkDerivation rec {
     m4ri
   ];
 
+  # does not compile correctly with -O2 on LLVM clang; see
+  # https://bitbucket.org/malb/m4rie/issues/23/trying-to-compile-on-apple-m1
+  makeFlags = [] ++ lib.optionals stdenv.isDarwin [ "CFLAGS=-O0" ];
   nativeBuildInputs = [
     autoreconfHook
   ];
@@ -35,7 +38,5 @@ stdenv.mkDerivation rec {
     license = licenses.gpl2Plus;
     maintainers = teams.sage.members;
     platforms = platforms.unix;
-    # never built on aarch64-darwin since first introduction in nixpkgs
-    broken = stdenv.isDarwin && stdenv.isAarch64;
   };
 }
diff --git a/pkgs/development/libraries/science/math/rubiks/default.nix b/pkgs/development/libraries/science/math/rubiks/default.nix
index 505457edd64f0..8f3fbe3451267 100644
--- a/pkgs/development/libraries/science/math/rubiks/default.nix
+++ b/pkgs/development/libraries/science/math/rubiks/default.nix
@@ -2,6 +2,7 @@
 , fetchurl
 , fetchpatch
 , coreutils
+, dos2unix
 }:
 
 stdenv.mkDerivation rec {
@@ -24,24 +25,54 @@ stdenv.mkDerivation rec {
     "PREFIX=$(out)"
   ];
 
+  nativeBuildInputs = [ dos2unix ];
+
+  prePatch = ''
+    find ./dietz/ -type f -exec dos2unix {} \;
+  '';
+
   patches = [
     # Fix makefiles which use all the variables in all the wrong ways and
     # hardcode values for some variables.
     (fetchpatch {
-      url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/dietz-cu2-Makefile.patch";
-      sha256 = "1ry3w1mk9q4jqd91zlaa1bdiiplld4hpfjaldbhlmzlgrrc99qmq";
+      url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/dietz-cu2-Makefile.patch";
+      sha256 = "bRU7MJ/6BgCp2PUqZOragJhm38Q3E8ShStXQIYwIjvw=";
+    })
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/dietz-mcube-Makefile.patch";
+      sha256 = "f53z4DogXKax1vUNkraOTt3TQ4bvT7CdQK/hOaaBS38=";
+    })
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/dietz-solver-Makefile.patch";
+      sha256 = "7gMC8y9elyIy2KvXYcp7YjPBNqn9PVhUle+/GrYAAdE=";
+    })
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/reid-Makefile.patch";
+      sha256 = "rp3SYtx02vVBtSlg1vJpdIoXNcdBNKDLCLqLAKwOYeQ=";
+    })
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-1-rubiks-includes.patch";
+      sha256 = "QYJ1KQ73HTEGY/beMVbcU215g/B8rHDjYD1YM2WZ7sk=";
+    })
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-2-rubiks-ansi-c.patch";
+      sha256 = "Rnu7uphE9URxnbg2K8mkymnB61magweH+WxVWR9JC4s=";
+    })
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-3-rubiks-prototypes.patch";
+      sha256 = "Wi038g+y7No1TNMiITtAdipjRi0+g6h0Sspslm5rZGU=";
     })
     (fetchpatch {
-      url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/dietz-mcube-Makefile.patch";
-      sha256 = "0zsbh6k3kqdg82fv0kzghr1x7pafisv943gmssqscp107bhg77bz";
+      url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-4-rubiks-longtype.patch";
+      sha256 = "6pNuxFM69CZ/TQGZfHXLlCN5g5lf3RiYYZKzMvLJwkw=";
     })
     (fetchpatch {
-      url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/dietz-solver-Makefile.patch";
-      sha256 = "0vhw70ylnmydgjhwx8jjlb2slccj4pfqn6vzirkyz1wp8apsmfhp";
+      url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-5-rubiks-signed.patch";
+      sha256 = "CCGXBMYvSjTm4YKQZAQMi6pWGjyHDYYQzdMZDSW2vFE=";
     })
     (fetchpatch {
-      url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/reid-Makefile.patch";
-      sha256 = "1r311sn012xs135s0d21qwsig2kld7rdcq19nm0zbnklviid57df";
+      url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-6-rubiks-attributes.patch";
+      sha256 = "RhlzMb33iaLfeBoF7Y0LIgEzOB/EC+AoWMSkRPCICaU=";
     })
   ];
 
diff --git a/pkgs/development/libraries/tachyon/default.nix b/pkgs/development/libraries/tachyon/default.nix
index 02fb1fbc1324e..2efee140a7e3c 100644
--- a/pkgs/development/libraries/tachyon/default.nix
+++ b/pkgs/development/libraries/tachyon/default.nix
@@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
          # see https://github.com/NixOS/nixpkgs/pull/117465
          if stdenv.hostPlatform.system == "aarch64-linux"  then "linux-arm"     else
          if stdenv.hostPlatform.system == "armv7l-linux"   then "linux-arm"     else
+         if stdenv.hostPlatform.system == "aarch64-darwin" then "macosx"        else
          if stdenv.hostPlatform.system == "x86_64-darwin"  then "macosx-thr"    else
          if stdenv.hostPlatform.system == "i686-darwin"    then "macosx-64-thr" else
          if stdenv.hostPlatform.system == "i686-cygwin"    then "win32"         else
diff --git a/pkgs/development/python-modules/fpylll/default.nix b/pkgs/development/python-modules/fpylll/default.nix
index 54d3d8f34f795..97885a443ff02 100644
--- a/pkgs/development/python-modules/fpylll/default.nix
+++ b/pkgs/development/python-modules/fpylll/default.nix
@@ -36,6 +36,10 @@ buildPythonPackage rec {
       url = "https://github.com/fplll/fpylll/commit/fc432b21fa7e4b9891f5b761b3539989eb958f2b.diff";
       hash = "sha256-+UidQ5xnlmjeVeVvR4J2zDzAuXP5LUPXCh4RP4o9oGA=";
     })
+    (fetchpatch {
+      url = "https://github.com/fplll/fpylll/commit/cece9c9b182dc3ac2c9121549cb427ccf4c4a9fe.diff";
+      hash = "sha256-epJb8gorQ7gEEylZ2yZFdM9+EZ4ys9mUUUPiJ2D0VOM=";
+    })
   ];
 
   nativeBuildInputs = [