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