Merge pull request #212043 from candyc1oud/coost

coost: init at 3.0.0
This commit is contained in:
Nick Cao 2023-01-22 16:52:56 +08:00 committed by GitHub
commit 75edfc3fd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,37 @@
{ lib, stdenv, fetchFromGitHub, cmake, curl, openssl, gitUpdater
, withCurl ? true, withOpenSSL ? true }:
stdenv.mkDerivation rec {
pname = "coost";
version = "3.0.0";
src = fetchFromGitHub {
owner = "idealvin";
repo = pname;
rev = "v${version}";
sha256 = "sha256-qpJh1yl0lYYszNHGo5Jkbzal2hnVzg7UUxiyg/Grva8=";
};
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;
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]
++ lib.optional withCurl "-DWITH_LIBCURL=ON"
++ lib.optional withOpenSSL "-DWITH_OPENSSL=ON";
passthru.updateScript = gitUpdater { };
meta = with lib; {
description = "A tiny boost library in C++11";
homepage = "https://github.com/idealvin/coost";
license = licenses.mit;
maintainers = with maintainers; [ candyc1oud ];
platforms = platforms.unix;
};
}

View File

@ -425,6 +425,8 @@ with pkgs;
containerpilot = callPackage ../applications/networking/cluster/containerpilot { };
coost = callPackage ../development/libraries/coost { };
crc = callPackage ../applications/networking/cluster/crc { };
coordgenlibs = callPackage ../development/libraries/coordgenlibs { };