2021-02-13 14:23:35 +00:00
|
|
|
{ lib, stdenv, fetchurl, libxml2, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, compressionSupport ? true, zlib ? null
|
|
|
|
, sslSupport ? true, openssl ? null
|
2021-01-05 17:05:55 +00:00
|
|
|
, static ? stdenv.hostPlatform.isStatic
|
|
|
|
, shared ? !stdenv.hostPlatform.isStatic
|
2022-11-02 22:02:43 +00:00
|
|
|
, bash
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert compressionSupport -> zlib != null;
|
|
|
|
assert sslSupport -> openssl != null;
|
|
|
|
assert static || shared;
|
|
|
|
|
|
|
|
let
|
2021-02-05 17:12:51 +00:00
|
|
|
inherit (lib) optionals;
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "0.32.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "neon";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-13 14:23:35 +00:00
|
|
|
url = "https://notroj.github.io/${pname}/${pname}-${version}.tar.gz";
|
2023-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-SHLhL4Alct7dSwL4cAZYFLLVFB99va9wju2rgmtRpYo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
patches = optionals stdenv.isDarwin [ ./darwin-fix-configure.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2022-11-02 22:02:43 +00:00
|
|
|
buildInputs = [libxml2 openssl bash]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional compressionSupport zlib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [
|
2021-02-05 17:12:51 +00:00
|
|
|
(lib.enableFeature shared "shared")
|
|
|
|
(lib.enableFeature static "static")
|
|
|
|
(lib.withFeature compressionSupport "zlib")
|
|
|
|
(lib.withFeature sslSupport "ssl")
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
preConfigure = ''
|
|
|
|
export PKG_CONFIG="$(command -v "$PKG_CONFIG")"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
passthru = {inherit compressionSupport sslSupport;};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "HTTP and WebDAV client library";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "neon-config";
|
2021-02-13 14:23:35 +00:00
|
|
|
homepage = "https://notroj.github.io/neon/";
|
|
|
|
changelog = "https://github.com/notroj/${pname}/blob/${version}/NEWS";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
};
|
|
|
|
}
|