571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
46 lines
1007 B
Nix
46 lines
1007 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, gtest
|
|
, zlib
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "msgpack-c";
|
|
version = "6.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "msgpack";
|
|
repo = "msgpack-c";
|
|
rev = "refs/tags/c-${finalAttrs.version}";
|
|
hash = "sha256-yL1+6w9l1Ccgrh8WXqvHv2yrb9QH+TrHIAFLXGoVuT0=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
];
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeBool "MSGPACK_BUILD_EXAMPLES" false) # examples are not installed even if built
|
|
(lib.cmakeBool "MSGPACK_BUILD_TESTS" finalAttrs.finalPackage.doCheck)
|
|
];
|
|
|
|
checkInputs = [
|
|
gtest
|
|
zlib
|
|
];
|
|
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
|
|
meta = with lib; {
|
|
description = "MessagePack implementation for C";
|
|
homepage = "https://github.com/msgpack/msgpack-c";
|
|
changelog = "https://github.com/msgpack/msgpack-c/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
|
license = licenses.boost;
|
|
maintainers = with maintainers; [ nickcao ];
|
|
};
|
|
})
|