2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, python
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, libxml2
|
|
|
|
, glib
|
|
|
|
, openssl
|
|
|
|
, zchunk
|
|
|
|
, curl
|
|
|
|
, check
|
|
|
|
, gpgme
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "1.14.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "librepo";
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "py" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rpm-software-management";
|
|
|
|
repo = "librepo";
|
|
|
|
rev = version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-KpGbHBgywaXV7r8W5CPS2N1GohdDFiOwAJmrrjS1m5g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
python
|
|
|
|
libxml2
|
|
|
|
glib
|
|
|
|
openssl
|
|
|
|
curl
|
|
|
|
check
|
|
|
|
gpgme
|
2021-01-05 17:05:55 +00:00
|
|
|
zchunk
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# librepo/fastestmirror.h includes curl/curl.h, and pkg-config specfile refers to others in here
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
curl
|
|
|
|
gpgme
|
|
|
|
libxml2
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
cmakeFlags = [ "-DPYTHON_DESIRED=${lib.substring 0 1 python.pythonVersion}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
moveToOutput "lib/${python.libPrefix}" "$py"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library providing C and Python (libcURL like) API for downloading linux repository metadata and packages";
|
|
|
|
homepage = "https://rpm-software-management.github.io/librepo/";
|
|
|
|
license = licenses.lgpl2Plus;
|
2020-12-25 13:55:36 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
};
|
|
|
|
}
|