2021-02-04 07:26:32 +01:00
|
|
|
{ lib, stdenv, fetchurl, libxml2, pkg-config
|
2010-04-28 10:40:19 +02:00
|
|
|
, compressionSupport ? true, zlib ? null
|
|
|
|
, sslSupport ? true, openssl ? null
|
2020-12-20 07:11:26 +01:00
|
|
|
, static ? stdenv.hostPlatform.isStatic
|
|
|
|
, shared ? !stdenv.hostPlatform.isStatic
|
2010-04-28 10:40:19 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert compressionSupport -> zlib != null;
|
|
|
|
assert sslSupport -> openssl != null;
|
|
|
|
assert static || shared;
|
|
|
|
|
2012-06-06 23:47:26 +02:00
|
|
|
let
|
2021-01-21 18:00:13 +01:00
|
|
|
inherit (lib) optionals;
|
2012-06-06 23:47:26 +02:00
|
|
|
in
|
|
|
|
|
2010-04-28 10:40:19 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2021-02-04 07:26:32 +01:00
|
|
|
version = "0.31.2";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "neon";
|
2010-04-28 10:40:19 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-04 07:26:32 +01:00
|
|
|
url = "https://notroj.github.io/${pname}/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "0y46dbhiblcvg8k41bdydr3fivghwk73z040ki5825d24ynf67ng";
|
2010-04-28 10:40:19 +02:00
|
|
|
};
|
|
|
|
|
2022-02-02 21:29:17 +01:00
|
|
|
patches = optionals stdenv.isDarwin [ ./darwin-fix-configure.patch ];
|
2012-06-06 23:47:26 +02:00
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-09-05 23:26:13 +02:00
|
|
|
buildInputs = [libxml2 openssl]
|
2021-01-21 18:00:13 +01:00
|
|
|
++ lib.optional compressionSupport zlib;
|
2010-04-28 10:40:19 +02:00
|
|
|
|
2018-07-25 23:44:21 +02:00
|
|
|
configureFlags = [
|
2021-01-21 18:00:13 +01:00
|
|
|
(lib.enableFeature shared "shared")
|
|
|
|
(lib.enableFeature static "static")
|
|
|
|
(lib.withFeature compressionSupport "zlib")
|
|
|
|
(lib.withFeature sslSupport "ssl")
|
2018-07-25 23:44:21 +02:00
|
|
|
];
|
2010-04-28 10:40:19 +02:00
|
|
|
|
|
|
|
passthru = {inherit compressionSupport sslSupport;};
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2010-04-28 10:40:19 +02:00
|
|
|
description = "An HTTP and WebDAV client library";
|
2021-02-04 07:26:32 +01:00
|
|
|
homepage = "https://notroj.github.io/neon/";
|
|
|
|
changelog = "https://github.com/notroj/${pname}/blob/${version}/NEWS";
|
2018-10-25 21:34:08 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.lgpl2;
|
2010-04-28 10:40:19 +02:00
|
|
|
};
|
|
|
|
}
|