mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-18 13:50:04 +00:00
sqlite_modern_cpp: init at 3.2-unstable-2023-12-03 (#537032)
This commit is contained in:
70
pkgs/by-name/sq/sqlite-modern-cpp/package.nix
Normal file
70
pkgs/by-name/sq/sqlite-modern-cpp/package.nix
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
|
||||
catch2,
|
||||
cmake,
|
||||
sqlite,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sqlite-modern-cpp";
|
||||
version = "3.2-unstable-2023-12-03";
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SqliteModernCpp";
|
||||
repo = "sqlite_modern_cpp";
|
||||
rev = "6e3009973025e0016d5573529067714201338c80";
|
||||
hash = "sha256-DD1EV3rBWe813TEHpa8nCnwHQjUizB5NOx5uGep5tJc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
catch2
|
||||
sqlite
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5")
|
||||
(lib.cmakeBool "HUNTER_ENABLED" false)
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
dontUseCmakeInstall = true;
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail 'find_package(sqlite3 CONFIG REQUIRED)' \
|
||||
'find_package(SQLite3 REQUIRED)' \
|
||||
--replace-fail 'sqlite3::sqlite3' 'SQLite::SQLite3'
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/include
|
||||
cp -r $src/hdr/. $out/include/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Lightweight C++ wrapper around sqlite3 C api";
|
||||
homepage = "https://github.com/SqliteModernCpp/sqlite_modern_cpp";
|
||||
# no changelog for unstable version, change to
|
||||
# https://github.com/SqliteModernCpp/sqlite_modern_cpp/releases/tag/v${finalAttrs.version}
|
||||
# if there are new releases in the future
|
||||
changelog = "https://github.com/SqliteModernCpp/sqlite_modern_cpp/releases";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ tetov ];
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user