Merge pull request #298957 from Feyorsh/sage-dep

sage: fix dependencies on Darwin/Clang16

authored by Mauricio Collares and committed by GitHub d3fd6364 f6618fa3

+84 -63
+4
pkgs/applications/science/math/gfan/default.nix
··· 14 14 15 15 postPatch = lib.optionalString stdenv.cc.isClang '' 16 16 substituteInPlace Makefile --replace "-fno-guess-branch-probability" "" 17 + 18 + for f in $(find -name "*.h" -or -name "*.cpp"); do 19 + substituteInPlace "$f" --replace-quiet "log2" "_log2" 20 + done 17 21 ''; 18 22 19 23 buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CXX=${stdenv.cc.targetPrefix}c++" ];
-2
pkgs/applications/science/math/sage/sage-env.nix
··· 39 39 , ecm 40 40 , lcalc 41 41 , rubiks 42 - , flintqs 43 42 , blas 44 43 , lapack 45 44 , flint3 ··· 93 92 ecm 94 93 lcalc 95 94 rubiks 96 - flintqs 97 95 jdk # only needed for `jmol` which may be replaced in the future 98 96 less # needed to prevent transient test errors until https://github.com/ipython/ipython/pull/11864 is resolved 99 97 ]
-2
pkgs/applications/science/math/sage/sage-with-env.nix
··· 13 13 , gmp 14 14 , gfan 15 15 , python3 16 - , flintqs 17 16 , eclib 18 17 , ntl 19 18 , ecm ··· 40 39 gfan 41 40 maxima 42 41 eclib 43 - flintqs 44 42 ntl 45 43 ecm 46 44 ];
+3 -6
pkgs/applications/science/math/singular/default.nix
··· 13 13 , doxygen 14 14 , graphviz 15 15 , latex2html 16 - # upstream generates docs with texinfo 4. later versions of texinfo 17 - # use letters instead of numbers for post-appendix chapters, and we 18 - # want it to match the upstream format because sage depends on it. 19 - , texinfo4 16 + , texinfo 20 17 , texliveSmall 21 - , enableDocs ? true 18 + , enableDocs ? !stdenv.isDarwin 22 19 , enableGfanlib ? true 23 20 }: 24 21 ··· 85 82 doxygen 86 83 graphviz 87 84 latex2html 88 - texinfo4 85 + texinfo 89 86 texliveSmall 90 87 ] ++ lib.optionals stdenv.isDarwin [ getconf ]; 91 88 depsBuildBuild = [ buildPackages.stdenv.cc ];
-1
pkgs/development/libraries/fflas-ffpack/default.nix
··· 50 50 doCheck = true; 51 51 52 52 meta = with lib; { 53 - broken = stdenv.isDarwin; 54 53 description = "Finite Field Linear Algebra Subroutines"; 55 54 mainProgram = "fflas-ffpack-config"; 56 55 license = licenses.lgpl21Plus;
+8
pkgs/development/libraries/flint/3.nix
··· 1 1 { lib 2 2 , stdenv 3 + , fetchpatch 3 4 , fetchurl 4 5 , gmp 5 6 , mpfr ··· 23 24 url = "https://www.flintlib.org/flint-${version}.tar.gz"; 24 25 sha256 = "sha256-ezEaAFA6hjiB64F32+uEMi8pOZ89fXLzsaTJuh1XlLQ="; 25 26 }; 27 + 28 + patches = [ 29 + (fetchpatch { 30 + url = "https://github.com/flintlib/flint/commit/e7d005c369754243cba32bd782ea2a5fc874fde5.diff"; 31 + hash = "sha256-IqEtYEpNVXfoTeerh/0ig+eDqUpAlGdBB3uO8ShYh3o="; 32 + }) 33 + ]; 26 34 27 35 nativeBuildInputs = [ 28 36 autoconf
+8
pkgs/development/libraries/fplll/default.nix
··· 1 1 { lib, stdenv 2 2 , fetchFromGitHub 3 + , fetchpatch 3 4 , pkg-config 4 5 , gettext 5 6 , autoreconfHook ··· 17 18 rev = version; 18 19 sha256 = "sha256-taSS7jpVyjVfNe6kSuUDXMD2PgKmtG64V5MjZyQzorI="; 19 20 }; 21 + 22 + patches = [ 23 + (fetchpatch { 24 + url = "https://github.com/fplll/fplll/commit/317cf70893eebfb2625da12e5377189908c36240.diff"; 25 + sha256 = "sha256-GbYSolBgv/he4QzjuRFdg93wHJABVHvA9x3PjpJTSRE="; 26 + }) 27 + ]; 20 28 21 29 nativeBuildInputs = [ 22 30 pkg-config
+5
pkgs/development/libraries/givaro/default.nix
··· 25 25 url = "https://github.com/linbox-team/givaro/commit/c7744bb133496cd7ac04688f345646d505e1bf52.patch"; 26 26 hash = "sha256-aAA5o8Va10v0Pqgcpx7qM0TAZiNQgXoR6N9xecj7tDA="; 27 27 }) 28 + (fetchpatch { 29 + name = "clang-16.patch"; 30 + url = "https://github.com/linbox-team/givaro/commit/a81d44b3b57c275bcb04ab00db79be02561deaa2.patch"; 31 + hash = "sha256-sSk+VWffoEjZRTJcHRISLHPyW6yuvI1u8knBOfxNUIE="; 32 + }) 28 33 ]; 29 34 30 35 enableParallelBuilding = true;
+8
pkgs/development/libraries/linbox/default.nix
··· 1 1 { lib, stdenv 2 2 , fetchFromGitHub 3 + , fetchpatch 3 4 , autoreconfHook 4 5 , givaro 5 6 , pkg-config ··· 22 23 rev = "v${version}"; 23 24 sha256 = "sha256-mW84a98KPLqcHMjX3LIYTmVe0ngUdz6RJLpoDaAqKU8="; 24 25 }; 26 + 27 + patches = [ 28 + (fetchpatch { 29 + url = "https://github.com/linbox-team/linbox/commit/4be26e9ef0eaf36a9909e5008940e8bf7dc625b6.patch"; 30 + sha256 = "PX0Tik7blXOV2vHUq92xMxaADkNoNGiax4qrjQyGK6U="; 31 + }) 32 + ]; 25 33 26 34 nativeBuildInputs = [ 27 35 autoreconfHook
-40
pkgs/development/libraries/science/math/flintqs/default.nix
··· 1 - { lib, stdenv 2 - , fetchFromGitHub 3 - , autoreconfHook 4 - , gmp 5 - }: 6 - 7 - stdenv.mkDerivation rec { 8 - version = "1.0"; 9 - pname = "flintqs"; 10 - 11 - src = fetchFromGitHub { 12 - owner = "sagemath"; 13 - repo = "FlintQS"; 14 - rev = "v${version}"; 15 - sha256 = "1f0lnayz6j6qgasx8pbq61d2fqam0wwhsmh6h15l4vq58l1vvbwj"; 16 - }; 17 - 18 - preAutoreconf = '' 19 - touch ChangeLog 20 - ''; 21 - 22 - buildInputs = [ 23 - gmp 24 - ]; 25 - 26 - nativeBuildInputs = [ 27 - autoreconfHook 28 - ]; 29 - 30 - doCheck = true; 31 - 32 - meta = with lib; { 33 - description = "Highly optimized multi-polynomial quadratic sieve for integer factorization"; 34 - homepage = "https://github.com/sagemath/FlintQS"; 35 - license = with licenses; [ gpl2 ]; 36 - maintainers = teams.sage.members; 37 - mainProgram = "QuadraticSieve"; 38 - platforms = platforms.all; 39 - }; 40 - }
+3 -2
pkgs/development/libraries/science/math/m4rie/default.nix
··· 21 21 m4ri 22 22 ]; 23 23 24 + # does not compile correctly with -O2 on LLVM clang; see 25 + # https://bitbucket.org/malb/m4rie/issues/23/trying-to-compile-on-apple-m1 26 + makeFlags = [] ++ lib.optionals stdenv.isDarwin [ "CFLAGS=-O0" ]; 24 27 nativeBuildInputs = [ 25 28 autoreconfHook 26 29 ]; ··· 35 38 license = licenses.gpl2Plus; 36 39 maintainers = teams.sage.members; 37 40 platforms = platforms.unix; 38 - # never built on aarch64-darwin since first introduction in nixpkgs 39 - broken = stdenv.isDarwin && stdenv.isAarch64; 40 41 }; 41 42 }
+39 -8
pkgs/development/libraries/science/math/rubiks/default.nix
··· 2 2 , fetchurl 3 3 , fetchpatch 4 4 , coreutils 5 + , dos2unix 5 6 }: 6 7 7 8 stdenv.mkDerivation rec { ··· 24 25 "PREFIX=$(out)" 25 26 ]; 26 27 28 + nativeBuildInputs = [ dos2unix ]; 29 + 30 + prePatch = '' 31 + find ./dietz/ -type f -exec dos2unix {} \; 32 + ''; 33 + 27 34 patches = [ 28 35 # Fix makefiles which use all the variables in all the wrong ways and 29 36 # hardcode values for some variables. 30 37 (fetchpatch { 31 - url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/dietz-cu2-Makefile.patch"; 32 - sha256 = "1ry3w1mk9q4jqd91zlaa1bdiiplld4hpfjaldbhlmzlgrrc99qmq"; 38 + url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/dietz-cu2-Makefile.patch"; 39 + sha256 = "bRU7MJ/6BgCp2PUqZOragJhm38Q3E8ShStXQIYwIjvw="; 40 + }) 41 + (fetchpatch { 42 + url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/dietz-mcube-Makefile.patch"; 43 + sha256 = "f53z4DogXKax1vUNkraOTt3TQ4bvT7CdQK/hOaaBS38="; 44 + }) 45 + (fetchpatch { 46 + url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/dietz-solver-Makefile.patch"; 47 + sha256 = "7gMC8y9elyIy2KvXYcp7YjPBNqn9PVhUle+/GrYAAdE="; 48 + }) 49 + (fetchpatch { 50 + url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/reid-Makefile.patch"; 51 + sha256 = "rp3SYtx02vVBtSlg1vJpdIoXNcdBNKDLCLqLAKwOYeQ="; 52 + }) 53 + (fetchpatch { 54 + url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-1-rubiks-includes.patch"; 55 + sha256 = "QYJ1KQ73HTEGY/beMVbcU215g/B8rHDjYD1YM2WZ7sk="; 33 56 }) 34 57 (fetchpatch { 35 - url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/dietz-mcube-Makefile.patch"; 36 - sha256 = "0zsbh6k3kqdg82fv0kzghr1x7pafisv943gmssqscp107bhg77bz"; 58 + url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-2-rubiks-ansi-c.patch"; 59 + sha256 = "Rnu7uphE9URxnbg2K8mkymnB61magweH+WxVWR9JC4s="; 60 + }) 61 + (fetchpatch { 62 + url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-3-rubiks-prototypes.patch"; 63 + sha256 = "Wi038g+y7No1TNMiITtAdipjRi0+g6h0Sspslm5rZGU="; 64 + }) 65 + (fetchpatch { 66 + url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-4-rubiks-longtype.patch"; 67 + sha256 = "6pNuxFM69CZ/TQGZfHXLlCN5g5lf3RiYYZKzMvLJwkw="; 37 68 }) 38 69 (fetchpatch { 39 - url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/dietz-solver-Makefile.patch"; 40 - sha256 = "0vhw70ylnmydgjhwx8jjlb2slccj4pfqn6vzirkyz1wp8apsmfhp"; 70 + url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-5-rubiks-signed.patch"; 71 + sha256 = "CCGXBMYvSjTm4YKQZAQMi6pWGjyHDYYQzdMZDSW2vFE="; 41 72 }) 42 73 (fetchpatch { 43 - url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/reid-Makefile.patch"; 44 - sha256 = "1r311sn012xs135s0d21qwsig2kld7rdcq19nm0zbnklviid57df"; 74 + url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-6-rubiks-attributes.patch"; 75 + sha256 = "RhlzMb33iaLfeBoF7Y0LIgEzOB/EC+AoWMSkRPCICaU="; 45 76 }) 46 77 ]; 47 78
+1
pkgs/development/libraries/tachyon/default.nix
··· 37 37 # see https://github.com/NixOS/nixpkgs/pull/117465 38 38 if stdenv.hostPlatform.system == "aarch64-linux" then "linux-arm" else 39 39 if stdenv.hostPlatform.system == "armv7l-linux" then "linux-arm" else 40 + if stdenv.hostPlatform.system == "aarch64-darwin" then "macosx" else 40 41 if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx-thr" else 41 42 if stdenv.hostPlatform.system == "i686-darwin" then "macosx-64-thr" else 42 43 if stdenv.hostPlatform.system == "i686-cygwin" then "win32" else
+4
pkgs/development/python-modules/fpylll/default.nix
··· 36 36 url = "https://github.com/fplll/fpylll/commit/fc432b21fa7e4b9891f5b761b3539989eb958f2b.diff"; 37 37 hash = "sha256-+UidQ5xnlmjeVeVvR4J2zDzAuXP5LUPXCh4RP4o9oGA="; 38 38 }) 39 + (fetchpatch { 40 + url = "https://github.com/fplll/fpylll/commit/cece9c9b182dc3ac2c9121549cb427ccf4c4a9fe.diff"; 41 + hash = "sha256-epJb8gorQ7gEEylZ2yZFdM9+EZ4ys9mUUUPiJ2D0VOM="; 42 + }) 39 43 ]; 40 44 41 45 nativeBuildInputs = [
+1
pkgs/top-level/aliases.nix
··· 347 347 fitnesstrax = throw "fitnesstrax was removed from nixpkgs because it disappeared upstream and no longer compiles"; # added 2023-07-04 348 348 flashrom-stable = flashprog; # Added 2024-03-01 349 349 flatbuffers_2_0 = flatbuffers; # Added 2022-05-12 350 + flintqs = throw "FlintQS has been removed due to lack of maintenance and security issues; use SageMath or FLINT instead"; # Added 2024-03-21 350 351 flutter2 = throw "flutter2 has been removed because it isn't updated anymore, and no packages in nixpkgs use it. If you still need it, use flutter.mkFlutter to get a custom version"; # Added 2023-07-03 351 352 flutter37 = throw "flutter37 has been removed because it isn't updated anymore, and no packages in nixpkgs use it. If you still need it, use flutter.mkFlutter to get a custom version"; # Added 2023-07-03 352 353 foldingathome = fahclient; # Added 2020-09-03
-2
pkgs/top-level/all-packages.nix
··· 38485 38485 38486 38486 ecos = callPackage ../development/libraries/science/math/ecos { }; 38487 38487 38488 - flintqs = callPackage ../development/libraries/science/math/flintqs { }; 38489 - 38490 38488 getdp = callPackage ../applications/science/math/getdp { }; 38491 38489 38492 38490 gurobi = callPackage ../applications/science/math/gurobi {