git.iko.soy/typeable/nixpkgs
on master help sign in
sage: fix pkgconfig errors in tests

python.pkgs.pkgconfig raises an exception on missing packages since version 1.5.0. Previously those errors were just silently ignored. That worked fine, since the packages are only missing at runtime (when they are not really needed) but present at buildtime. Since this fails the tests now, we just add the packages to PKG_CONFIG_PATH at runtime. This does not add additional runtime dependencies. Still, it would be nicer if the sage testssuite would not test the buildsystem at runtime in the first place. The breakage was originally caused by the pkgconfig update in 1efa71616fadd5c7f852173445b2db824534b99b.

commitf64885b9ca7d3cb048027184f6094f81e7812e28 authorTimo Kaufmann <timokau@zoho.com> dateMon 4 Nov 2019, 11:36 (7 years ago) parentda7ec1c
1 file changed+19−6
pkgs/applications/science/math/sage/sage-env.nix+19−6
pkgs/applications/science/math/sage/sage-env.nix+19−6
@@ -18,6 +18,12 @@
1818, ecl
1919, maxima-ecl
2020, singular
21+, fflas-ffpack
22+, givaro
23+, gd
24+, libpng
25+, linbox
26+, m4ri
2127, giac
2228, palp
2329, rWrapper
@@ -101,14 +107,21 @@ writeTextFile rec {
101107 name = "sage-env";
102108 destination = "/${name}";
103109 text = ''
104− export PKG_CONFIG_PATH='${lib.concatStringsSep ":" (map (pkg: "${pkg}/lib/pkgconfig") [
105− # This is only needed in the src/sage/misc/cython.py test and I'm not
106− # sure if there's really a usecase for it outside of the tests. However
107− # since singular and openblas are runtime dependencies anyways, it doesn't
108− # really hurt to include.
110+ export PKG_CONFIG_PATH='${lib.makeSearchPathOutput "dev" "lib/pkgconfig" [
111+ # This should only be needed during build. However, since the doctests
112+ # also test the cython build (for example in src/sage/misc/cython.py),
113+ # it is also needed for the testsuite to pass. We could fix the
114+ # testsuite instead, but since all the packages are also runtime
115+ # dependencies it doesn't really hurt to include them here.
109116 singular
110117 openblasCompat
111− ])
118+ fflas-ffpack givaro
119+ gd
120+ libpng zlib
121+ gsl
122+ linbox
123+ m4ri
124+ ]
112125 }'
113126 export SAGE_ROOT='${sagelib.src}'
114127 export SAGE_LOCAL='@sage-local@'