Merge pull request #45257 from timokau/openblas-pc
openblas: add pkg-config aliases
This commit is contained in:
commit
c614c15f93
@ -21,7 +21,7 @@ let
|
|||||||
|
|
||||||
sagelib = self.callPackage ./sagelib.nix {
|
sagelib = self.callPackage ./sagelib.nix {
|
||||||
inherit flint ecl arb;
|
inherit flint ecl arb;
|
||||||
inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
|
inherit sage-src pynac singular;
|
||||||
linbox = nixpkgs.linbox.override { withSage = true; };
|
linbox = nixpkgs.linbox.override { withSage = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -41,13 +41,13 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
sage-env = self.callPackage ./sage-env.nix {
|
sage-env = self.callPackage ./sage-env.nix {
|
||||||
inherit sage-src python rWrapper openblas-cblas-pc ecl singular palp flint pynac pythonEnv;
|
inherit sage-src python rWrapper ecl singular palp flint pynac pythonEnv;
|
||||||
pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
|
pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
|
||||||
};
|
};
|
||||||
|
|
||||||
sage-with-env = self.callPackage ./sage-with-env.nix {
|
sage-with-env = self.callPackage ./sage-with-env.nix {
|
||||||
inherit pythonEnv;
|
inherit pythonEnv;
|
||||||
inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
|
inherit sage-src pynac singular;
|
||||||
pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
|
pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
|
||||||
three = nodePackages_8_x.three;
|
three = nodePackages_8_x.three;
|
||||||
};
|
};
|
||||||
@ -60,10 +60,6 @@ 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 {};
|
sage-src = callPackage ./sage-src.nix {};
|
||||||
|
|
||||||
pythonRuntimeDeps = with python.pkgs; [
|
pythonRuntimeDeps = with python.pkgs; [
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
{ 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
|
, lcalc
|
||||||
, rubiks
|
, rubiks
|
||||||
, flintqs
|
, flintqs
|
||||||
, openblas-cblas-pc
|
, openblasCompat
|
||||||
, flint
|
, flint
|
||||||
, gmp
|
, gmp
|
||||||
, mpfr
|
, mpfr
|
||||||
@ -98,9 +98,9 @@ writeTextFile rec {
|
|||||||
export PKG_CONFIG_PATH='${lib.concatStringsSep ":" (map (pkg: "${pkg}/lib/pkgconfig") [
|
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
|
# 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
|
# for it outside of the tests. However since singular and openblas are runtime dependencies anyways
|
||||||
# and openblas-cblas-pc is tiny, it doesn't really hurt to include.
|
# it doesn't really hurt to include.
|
||||||
singular
|
singular
|
||||||
openblas-cblas-pc
|
openblasCompat
|
||||||
])
|
])
|
||||||
}'
|
}'
|
||||||
export SAGE_ROOT='${sage-src}'
|
export SAGE_ROOT='${sage-src}'
|
||||||
|
@ -4,9 +4,6 @@
|
|||||||
, sage-env
|
, sage-env
|
||||||
, sage-src
|
, sage-src
|
||||||
, openblasCompat
|
, openblasCompat
|
||||||
, openblas-blas-pc
|
|
||||||
, openblas-cblas-pc
|
|
||||||
, openblas-lapack-pc
|
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, three
|
, three
|
||||||
, singular
|
, singular
|
||||||
@ -32,9 +29,6 @@ let
|
|||||||
makeWrapper
|
makeWrapper
|
||||||
pkg-config
|
pkg-config
|
||||||
openblasCompat # lots of segfaults with regular (64 bit) openblas
|
openblasCompat # lots of segfaults with regular (64 bit) openblas
|
||||||
openblas-blas-pc
|
|
||||||
openblas-cblas-pc
|
|
||||||
openblas-lapack-pc
|
|
||||||
singular
|
singular
|
||||||
three
|
three
|
||||||
pynac
|
pynac
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, arb
|
, arb
|
||||||
, openblasCompat
|
, openblasCompat
|
||||||
, openblas-blas-pc
|
|
||||||
, openblas-cblas-pc
|
|
||||||
, openblas-lapack-pc
|
|
||||||
, brial
|
, brial
|
||||||
, cliquer
|
, cliquer
|
||||||
, cypari2
|
, cypari2
|
||||||
@ -59,9 +56,7 @@ buildPythonPackage rec {
|
|||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
iml
|
iml
|
||||||
perl
|
perl
|
||||||
openblas-blas-pc
|
openblasCompat
|
||||||
openblas-cblas-pc
|
|
||||||
openblas-lapack-pc
|
|
||||||
jupyter_core
|
jupyter_core
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -136,6 +136,20 @@ stdenv.mkDerivation rec {
|
|||||||
doCheck = true;
|
doCheck = true;
|
||||||
checkTarget = "tests";
|
checkTarget = "tests";
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# Write pkgconfig aliases. Upstream report:
|
||||||
|
# https://github.com/xianyi/OpenBLAS/issues/1740
|
||||||
|
for alias in blas cblas lapack; do
|
||||||
|
cat <<EOF > $out/lib/pkgconfig/openblas-$alias.pc
|
||||||
|
Name: $alias
|
||||||
|
Version: ${version}
|
||||||
|
Description: $alias provided by the OpenBLAS package.
|
||||||
|
Cflags: -I$out/include
|
||||||
|
Libs: -L$out/lib -lopenblas
|
||||||
|
EOF
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Basic Linear Algebra Subprograms";
|
description = "Basic Linear Algebra Subprograms";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
|
Loading…
Reference in New Issue
Block a user