Revert "double-conversion: add pkg-config and testing"

This commit is contained in:
Vladimír Čunát
2025-10-28 10:22:26 +01:00
committed by GitHub
parent dc8e93e7b8
commit 3c2d600fa3
+7 -33
View File
@@ -4,19 +4,17 @@
fetchFromGitHub,
fetchpatch,
cmake,
ninja,
ctestCheckHook,
testers,
enableStatic ? stdenv.hostPlatform.isStatic,
}:
stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation rec {
pname = "double-conversion";
version = "3.3.1";
src = fetchFromGitHub {
owner = "google";
repo = "double-conversion";
rev = "v${finalAttrs.version}";
rev = "v${version}";
sha256 = "sha256-M80H+azCzQYa4/gBLWv5GNNhEuHsH7LbJ/ajwmACnrM=";
};
@@ -32,46 +30,22 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://github.com/google/double-conversion/commit/0604b4c18815aadcf7f4b78dfa6bfcb91a634ed7.patch";
hash = "sha256-cJBp1ou1O/bMQ/7kvcX52dWbUdhmPfQ9aWmEhQdyhis=";
})
(fetchpatch {
name = "double-conversion-add-pkg-config.patch";
url = "https://github.com/google/double-conversion/commit/ddfd18c58ecc32fc74afc1083bb8774240b54efb.patch";
hash = "sha256-/pKCL19vS8fNwCm27yTNP+32ApHTH5dEGpnsMI11Lf4=";
})
];
outputs = [
"out"
"dev"
];
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [
cmake
ninja
ctestCheckHook
];
doCheck = true;
cmakeFlags = [
(lib.cmakeBool "BUILD_TESTING" true)
(lib.cmakeBool "BUILD_SHARED_LIBS" stdenv.hostPlatform.hasSharedLibraries)
];
cmakeFlags = lib.optional (!enableStatic) "-DBUILD_SHARED_LIBS=ON";
# Case sensitivity issue
preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
rm BUILD
'';
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
meta = with lib; {
pkgConfigModules = [ "double-conversion" ];
description = "Binary-decimal and decimal-binary routines for IEEE doubles";
homepage = "https://github.com/google/double-conversion";
license = licenses.bsd3;
platforms = platforms.unix ++ platforms.windows;
maintainers = with lib.maintainers; [ fzakaria ];
maintainers = [ ];
};
})
}