2021-01-10 23:54:33 -08:00
|
|
|
{ lib, stdenv
|
2020-02-07 17:33:05 -08:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, python
|
2021-01-17 01:17:16 -08:00
|
|
|
, pkg-config
|
2020-02-07 17:33:05 -08:00
|
|
|
, libxml2
|
|
|
|
, glib
|
|
|
|
, openssl
|
2020-02-07 18:07:04 -08:00
|
|
|
, zchunk
|
2020-02-07 17:33:05 -08:00
|
|
|
, curl
|
|
|
|
, check
|
|
|
|
, gpgme
|
|
|
|
}:
|
2016-04-28 19:46:16 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-02-03 08:10:43 -08:00
|
|
|
version = "1.13.0";
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "librepo";
|
2016-04-28 19:46:16 -07:00
|
|
|
|
2020-02-07 18:07:04 -08:00
|
|
|
outputs = [ "out" "dev" "py" ];
|
|
|
|
|
2016-04-28 19:46:16 -07:00
|
|
|
src = fetchFromGitHub {
|
2020-02-07 17:33:05 -08:00
|
|
|
owner = "rpm-software-management";
|
|
|
|
repo = "librepo";
|
|
|
|
rev = version;
|
2021-02-03 08:10:43 -08:00
|
|
|
sha256 = "sha256-gK1pkcZAJVXx0cYGs8PA4iPSMOwgJZI9Hqrrs1ZITDo=";
|
2016-04-28 19:46:16 -07:00
|
|
|
};
|
|
|
|
|
2020-02-07 17:33:05 -08:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2021-01-17 01:17:16 -08:00
|
|
|
pkg-config
|
2020-02-07 17:33:05 -08:00
|
|
|
];
|
2017-06-19 20:27:48 -07:00
|
|
|
|
2020-02-07 17:33:05 -08:00
|
|
|
buildInputs = [
|
|
|
|
python
|
|
|
|
libxml2
|
|
|
|
glib
|
|
|
|
openssl
|
|
|
|
curl
|
|
|
|
check
|
|
|
|
gpgme
|
2020-12-30 07:08:49 -08:00
|
|
|
zchunk
|
|
|
|
];
|
2016-04-28 19:46:16 -07:00
|
|
|
|
|
|
|
# librepo/fastestmirror.h includes curl/curl.h, and pkg-config specfile refers to others in here
|
2020-02-07 17:33:05 -08:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
curl
|
|
|
|
gpgme
|
|
|
|
libxml2
|
|
|
|
];
|
|
|
|
|
2021-01-15 01:19:50 -08:00
|
|
|
cmakeFlags = [ "-DPYTHON_DESIRED=${lib.substring 0 1 python.pythonVersion}" ];
|
2016-04-30 09:01:26 -07:00
|
|
|
|
2020-02-07 18:07:04 -08:00
|
|
|
postFixup = ''
|
|
|
|
moveToOutput "lib/${python.libPrefix}" "$py"
|
|
|
|
'';
|
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2016-04-30 09:01:26 -07:00
|
|
|
description = "Library providing C and Python (libcURL like) API for downloading linux repository metadata and packages";
|
2020-02-07 17:33:05 -08:00
|
|
|
homepage = "https://rpm-software-management.github.io/librepo/";
|
|
|
|
license = licenses.lgpl2Plus;
|
2020-12-17 07:43:09 -08:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2016-04-30 09:01:26 -07:00
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
};
|
2016-04-28 19:46:16 -07:00
|
|
|
}
|