tomlplusplus: improve derivation (#338825)
This commit is contained in:
68
pkgs/by-name/to/tomlplusplus/package.nix
Normal file
68
pkgs/by-name/to/tomlplusplus/package.nix
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
cmake,
|
||||||
|
fetchFromGitHub,
|
||||||
|
fetchpatch2,
|
||||||
|
glibcLocales,
|
||||||
|
lib,
|
||||||
|
meson,
|
||||||
|
ninja,
|
||||||
|
nix-update-script,
|
||||||
|
pkg-config,
|
||||||
|
stdenv,
|
||||||
|
testers,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "tomlplusplus";
|
||||||
|
version = "3.4.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "marzer";
|
||||||
|
repo = "tomlplusplus";
|
||||||
|
rev = "refs/tags/v${finalAttrs.version}";
|
||||||
|
hash = "sha256-h5tbO0Rv2tZezY58yUbyRVpsfRjY3i+5TPkkxr6La8M=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# TODO: Remove this patch at the next update
|
||||||
|
# https://github.com/marzer/tomlplusplus/pull/233
|
||||||
|
(fetchpatch2 {
|
||||||
|
name = "tomlplusplus-install-example-programs.patch";
|
||||||
|
url = "https://github.com/marzer/tomlplusplus/commit/8128eb632325d1820f4d17dd8250dcda6ab07743.patch";
|
||||||
|
hash = "sha256-7m2P+e1/OASHrzm9LSy6RnayS/kGxFC82xOyGBGXeG0=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
meson
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
glibcLocales
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
mesonFlags = [
|
||||||
|
"-Dbuild_tests=${lib.boolToString finalAttrs.doCheck}"
|
||||||
|
"-Dbuild_examples=true"
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
updateScript = nix-update-script { };
|
||||||
|
tests.pkg-config = testers.hasPkgConfigModules {
|
||||||
|
package = finalAttrs.finalPackage;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://github.com/marzer/tomlplusplus";
|
||||||
|
description = "Header-only TOML config file parser and serializer for C++17";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ Scrumplex ];
|
||||||
|
pkgConfigModules = [ "tomlplusplus" ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
})
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
{ lib
|
|
||||||
, stdenv
|
|
||||||
, meson
|
|
||||||
, cmake
|
|
||||||
, ninja
|
|
||||||
, fetchFromGitHub
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "tomlplusplus";
|
|
||||||
version = "3.4.0";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "marzer";
|
|
||||||
repo = "tomlplusplus";
|
|
||||||
rev = "v${finalAttrs.version}";
|
|
||||||
hash = "sha256-h5tbO0Rv2tZezY58yUbyRVpsfRjY3i+5TPkkxr6La8M=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ meson cmake ninja ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
homepage = "https://github.com/marzer/tomlplusplus";
|
|
||||||
description = "Header-only TOML config file parser and serializer for C++17";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = with maintainers; [ Scrumplex ];
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
@@ -23259,8 +23259,6 @@ with pkgs;
|
|||||||
|
|
||||||
kyotocabinet = callPackage ../development/libraries/kyotocabinet { };
|
kyotocabinet = callPackage ../development/libraries/kyotocabinet { };
|
||||||
|
|
||||||
tomlplusplus = callPackage ../development/libraries/tomlplusplus { };
|
|
||||||
|
|
||||||
tokyocabinet = callPackage ../development/libraries/tokyo-cabinet { };
|
tokyocabinet = callPackage ../development/libraries/tokyo-cabinet { };
|
||||||
|
|
||||||
tokyotyrant = callPackage ../development/libraries/tokyo-tyrant { };
|
tokyotyrant = callPackage ../development/libraries/tokyo-tyrant { };
|
||||||
|
|||||||
Reference in New Issue
Block a user