Merge pull request #46337 from timokau/sage-openblas-fix
sage: re-add pkg-config aliases
This commit is contained in:
commit
83b259271f
5 changed files with 39 additions and 7 deletions
|
@ -21,7 +21,7 @@ let
|
|||
|
||||
sagelib = self.callPackage ./sagelib.nix {
|
||||
inherit flint ecl arb;
|
||||
inherit sage-src pynac singular;
|
||||
inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
|
||||
linbox = nixpkgs.linbox.override { withSage = true; };
|
||||
};
|
||||
|
||||
|
@ -41,13 +41,13 @@ let
|
|||
};
|
||||
|
||||
sage-env = self.callPackage ./sage-env.nix {
|
||||
inherit sage-src python rWrapper ecl singular palp flint pynac pythonEnv;
|
||||
inherit sage-src python rWrapper openblas-cblas-pc ecl singular palp flint pynac pythonEnv;
|
||||
pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
|
||||
};
|
||||
|
||||
sage-with-env = self.callPackage ./sage-with-env.nix {
|
||||
inherit pythonEnv;
|
||||
inherit sage-src pynac singular;
|
||||
inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
|
||||
pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
|
||||
three = nodePackages_8_x.three;
|
||||
};
|
||||
|
@ -60,6 +60,10 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
openblas-blas-pc = callPackage ./openblas-pc.nix { name = "blas"; };
|
||||
openblas-cblas-pc = callPackage ./openblas-pc.nix { name = "cblas"; };
|
||||
openblas-lapack-pc = callPackage ./openblas-pc.nix { name = "lapack"; };
|
||||
|
||||
sage-src = callPackage ./sage-src.nix {};
|
||||
|
||||
pythonRuntimeDeps = with python.pkgs; [
|
||||
|
|
17
pkgs/applications/science/math/sage/openblas-pc.nix
Normal file
17
pkgs/applications/science/math/sage/openblas-pc.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ openblasCompat
|
||||
, writeTextFile
|
||||
, name
|
||||
}:
|
||||
|
||||
writeTextFile {
|
||||
name = "openblas-${name}-pc-${openblasCompat.version}";
|
||||
destination = "/lib/pkgconfig/${name}.pc";
|
||||
text = ''
|
||||
Name: ${name}
|
||||
Version: ${openblasCompat.version}
|
||||
|
||||
Description: ${name} for SageMath, provided by the OpenBLAS package.
|
||||
Cflags: -I${openblasCompat}/include
|
||||
Libs: -L${openblasCompat}/lib -lopenblas
|
||||
'';
|
||||
}
|
|
@ -37,7 +37,7 @@
|
|||
, lcalc
|
||||
, rubiks
|
||||
, flintqs
|
||||
, openblasCompat
|
||||
, openblas-cblas-pc
|
||||
, flint
|
||||
, gmp
|
||||
, mpfr
|
||||
|
@ -98,9 +98,9 @@ writeTextFile rec {
|
|||
export PKG_CONFIG_PATH='${lib.concatStringsSep ":" (map (pkg: "${pkg}/lib/pkgconfig") [
|
||||
# This is only needed in the src/sage/misc/cython.py test and I'm not sure if there's really a use-case
|
||||
# for it outside of the tests. However since singular and openblas are runtime dependencies anyways
|
||||
# it doesn't really hurt to include.
|
||||
# and openblas-cblas-pc is tiny, it doesn't really hurt to include.
|
||||
singular
|
||||
openblasCompat
|
||||
openblas-cblas-pc
|
||||
])
|
||||
}'
|
||||
export SAGE_ROOT='${sage-src}'
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
, sage-env
|
||||
, sage-src
|
||||
, openblasCompat
|
||||
, openblas-blas-pc
|
||||
, openblas-cblas-pc
|
||||
, openblas-lapack-pc
|
||||
, pkg-config
|
||||
, three
|
||||
, singular
|
||||
|
@ -29,6 +32,9 @@ let
|
|||
makeWrapper
|
||||
pkg-config
|
||||
openblasCompat # lots of segfaults with regular (64 bit) openblas
|
||||
openblas-blas-pc
|
||||
openblas-cblas-pc
|
||||
openblas-lapack-pc
|
||||
singular
|
||||
three
|
||||
pynac
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
, buildPythonPackage
|
||||
, arb
|
||||
, openblasCompat
|
||||
, openblas-blas-pc
|
||||
, openblas-cblas-pc
|
||||
, openblas-lapack-pc
|
||||
, brial
|
||||
, cliquer
|
||||
, cypari2
|
||||
|
@ -56,7 +59,9 @@ buildPythonPackage rec {
|
|||
nativeBuildInputs = [
|
||||
iml
|
||||
perl
|
||||
openblasCompat
|
||||
openblas-blas-pc
|
||||
openblas-cblas-pc
|
||||
openblas-lapack-pc
|
||||
jupyter_core
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue