mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 11:03:57 +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.
39 lines
1.0 KiB
Nix
39 lines
1.0 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, openssl, enableStatic ? stdenv.hostPlatform.isStatic, enableShared ? !stdenv.hostPlatform.isStatic }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "paho.mqtt.c";
|
|
version = "1.3.13";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "eclipse";
|
|
repo = "paho.mqtt.c";
|
|
rev = "v${version}";
|
|
hash = "sha256-dKQnepQAryAjImh2rX1jdgiKBtJQy9wzk/7rGQjUtPg=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/MQTTVersion.c \
|
|
--replace "namebuf[60]" "namebuf[120]" \
|
|
--replace "lib%s" "$out/lib/lib%s"
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeBool "PAHO_WITH_SSL" true)
|
|
(lib.cmakeBool "PAHO_BUILD_STATIC" enableStatic)
|
|
(lib.cmakeBool "PAHO_BUILD_SHARED" enableShared)
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Eclipse Paho MQTT C Client Library";
|
|
mainProgram = "MQTTVersion";
|
|
homepage = "https://www.eclipse.org/paho/";
|
|
license = licenses.epl20;
|
|
maintainers = with maintainers; [ sikmir ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|