msgpack-c: use finalAttrs pattern

This commit is contained in:
Nick Cao 2023-07-18 08:52:35 +08:00
parent d0299f7fa1
commit 5107d158ab
No known key found for this signature in database

View file

@ -6,14 +6,14 @@
, zlib
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "msgpack-c";
version = "6.0.0";
src = fetchFromGitHub {
owner = "msgpack";
repo = "msgpack-c";
rev = "refs/tags/c-${version}";
rev = "refs/tags/c-${finalAttrs.version}";
hash = "sha256-TfC37QKwqvHxsLPgsEqJYkb7mpRQekbntbBPV4v4FO8=";
};
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DMSGPACK_BUILD_EXAMPLES=OFF" # examples are not installed even if built
] ++ lib.optional (!doCheck) "-DMSGPACK_BUILD_TESTS=OFF";
] ++ lib.optional (!finalAttrs.doCheck) "-DMSGPACK_BUILD_TESTS=OFF";
checkInputs = [
gtest
@ -37,8 +37,8 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "MessagePack implementation for C";
homepage = "https://github.com/msgpack/msgpack-c";
changelog = "https://github.com/msgpack/msgpack-c/blob/${src.rev}/CHANGELOG.md";
changelog = "https://github.com/msgpack/msgpack-c/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = licenses.boost;
maintainers = with maintainers; [ nickcao ];
};
}
})