liblapack: Add `meta.pkgConfigModules` and test

+9 -5
+9 -5
pkgs/development/libraries/science/math/liblapack/default.nix
··· 6 , shared ? true 7 # Compile with ILP64 interface 8 , blas64 ? false 9 }: 10 11 - stdenv.mkDerivation rec { 12 pname = "liblapack"; 13 version = "3.11"; 14 15 src = fetchFromGitHub { 16 owner = "Reference-LAPACK"; 17 repo = "lapack"; 18 - rev = "v${version}"; 19 sha256 = "sha256-AYD78u70y8cY19hmM/aDjQEzxO8u9lPWhCFxRe5cqXI="; 20 }; 21 ··· 40 41 postInstall = let 42 canonicalExtension = if stdenv.hostPlatform.isLinux 43 - then "${stdenv.hostPlatform.extensions.sharedLibrary}.${lib.versions.major version}" 44 else stdenv.hostPlatform.extensions.sharedLibrary; 45 in lib.optionalString blas64 '' 46 ln -s $out/lib/liblapack64${canonicalExtension} $out/lib/liblapack${canonicalExtension} ··· 65 66 checkPhase = '' 67 runHook preCheck 68 - ctest ${ctestArgs} 69 runHook postCheck 70 ''; 71 72 meta = with lib; { 73 description = "Linear Algebra PACKage"; 74 homepage = "http://www.netlib.org/lapack/"; 75 maintainers = with maintainers; [ markuskowa ]; 76 license = licenses.bsd3; 77 platforms = platforms.all; 78 }; 79 - }
··· 6 , shared ? true 7 # Compile with ILP64 interface 8 , blas64 ? false 9 + , testers 10 }: 11 12 + stdenv.mkDerivation (finalAttrs: { 13 pname = "liblapack"; 14 version = "3.11"; 15 16 src = fetchFromGitHub { 17 owner = "Reference-LAPACK"; 18 repo = "lapack"; 19 + rev = "v${finalAttrs.version}"; 20 sha256 = "sha256-AYD78u70y8cY19hmM/aDjQEzxO8u9lPWhCFxRe5cqXI="; 21 }; 22 ··· 41 42 postInstall = let 43 canonicalExtension = if stdenv.hostPlatform.isLinux 44 + then "${stdenv.hostPlatform.extensions.sharedLibrary}.${lib.versions.major finalAttrs.version}" 45 else stdenv.hostPlatform.extensions.sharedLibrary; 46 in lib.optionalString blas64 '' 47 ln -s $out/lib/liblapack64${canonicalExtension} $out/lib/liblapack${canonicalExtension} ··· 66 67 checkPhase = '' 68 runHook preCheck 69 + ctest ${finalAttrs.ctestArgs} 70 runHook postCheck 71 ''; 72 + 73 + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 74 75 meta = with lib; { 76 description = "Linear Algebra PACKage"; 77 homepage = "http://www.netlib.org/lapack/"; 78 maintainers = with maintainers; [ markuskowa ]; 79 license = licenses.bsd3; 80 + pkgConfigModules = [ "lapack" ]; 81 platforms = platforms.all; 82 }; 83 + })