mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 15:44:20 +00:00
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.
66 lines
1.5 KiB
Nix
66 lines
1.5 KiB
Nix
{ stdenv
|
||
, lib
|
||
, fetchFromGitHub
|
||
, perl
|
||
, which
|
||
, boost
|
||
, rdkafka
|
||
, jansson
|
||
, curl
|
||
, avro-c
|
||
, avro-cpp
|
||
, nix-update-script }:
|
||
|
||
stdenv.mkDerivation rec {
|
||
pname = "libserdes";
|
||
version = "7.7.1";
|
||
|
||
src = fetchFromGitHub {
|
||
owner = "confluentinc";
|
||
repo = pname;
|
||
rev = "v${version}";
|
||
hash = "sha256-rg4SWa9nIDT6JrnnCDwdiFE1cvpUn0HWHn+bPkXMHQ4=";
|
||
};
|
||
|
||
outputs = [ "dev" "out" ];
|
||
|
||
nativeBuildInputs = [ perl which ];
|
||
|
||
buildInputs = [ boost rdkafka jansson curl avro-c avro-cpp ];
|
||
|
||
makeFlags = [ "GEN_PKG_CONFIG=y" ];
|
||
|
||
postPatch = ''
|
||
patchShebangs configure lds-gen.pl
|
||
'';
|
||
|
||
# Has a configure script but it’s not Autoconf so steal some bits from multiple-outputs.sh:
|
||
setOutputFlags = false;
|
||
|
||
preConfigure = ''
|
||
configureFlagsArray+=(
|
||
"--libdir=''${!outputLib}/lib"
|
||
"--includedir=''${!outputInclude}/include"
|
||
)
|
||
'';
|
||
|
||
preInstall = ''
|
||
installFlagsArray+=("pkgconfigdir=''${!outputDev}/lib/pkgconfig")
|
||
'';
|
||
|
||
# Header files get installed with executable bit for some reason; get rid of it.
|
||
postInstall = ''
|
||
chmod -x ''${!outputInclude}/include/libserdes/*.h
|
||
'';
|
||
|
||
passthru.updateScript = nix-update-script { };
|
||
|
||
meta = with lib; {
|
||
description = "Schema-based serializer/deserializer C/C++ library with support for Avro and the Confluent Platform Schema Registry";
|
||
homepage = "https://github.com/confluentinc/libserdes";
|
||
license = licenses.asl20;
|
||
maintainers = with maintainers; [ liff ];
|
||
platforms = platforms.all;
|
||
};
|
||
}
|