nixpkgs/pkgs/by-name/co/coost/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.2 KiB
Nix
Raw Normal View History

2024-04-30 04:54:10 +01:00
{
lib,
stdenv,
fetchFromGitHub,
cmake,
curl,
openssl,
gitUpdater,
withCurl ? true,
withOpenSSL ? true,
}:
2023-01-22 05:40:20 +00:00
2024-05-08 23:31:01 +01:00
stdenv.mkDerivation (finalAttrs: {
2023-01-22 05:40:20 +00:00
pname = "coost";
2024-05-08 23:28:45 +01:00
version = "3.0.2";
2023-01-22 05:40:20 +00:00
src = fetchFromGitHub {
owner = "idealvin";
2024-05-08 23:31:01 +01:00
repo = "coost";
rev = "v${finalAttrs.version}";
hash = "sha256-HbMenAL/UWsqQ1o7cMeWfwXkLh4GxIKV7iuZQD3hDA8=";
2023-01-22 05:40:20 +00:00
};
postPatch = ''
substituteInPlace cmake/coost.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ \
'';
nativeBuildInputs = [ cmake ];
buildInputs = lib.optional withCurl curl ++ lib.optional withOpenSSL openssl;
2024-04-30 04:54:10 +01:00
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
] ++ lib.optional withCurl "-DWITH_LIBCURL=ON" ++ lib.optional withOpenSSL "-DWITH_OPENSSL=ON";
2023-01-22 05:40:20 +00:00
2024-05-08 23:31:01 +01:00
outputs = [ "out" "dev" ];
2023-01-22 05:40:20 +00:00
passthru.updateScript = gitUpdater { };
meta = with lib; {
description = "A tiny boost library in C++11";
homepage = "https://github.com/idealvin/coost";
license = licenses.mit;
2024-04-30 04:29:42 +01:00
maintainers = [ maintainers.sigmanificient ];
2023-01-22 05:40:20 +00:00
platforms = platforms.unix;
};
2024-05-08 23:31:01 +01:00
})