2021-01-11 07:54:33 +00:00
|
|
|
{ gcc9Stdenv, lib, stdenv, fetchFromGitHub, cmake, gettext, pkg-config, gpgme, libsolv, openssl, check
|
2021-02-12 01:36:53 +00:00
|
|
|
, json_c, libmodulemd, libsmartcols, sqlite, librepo, libyaml, rpm }:
|
2020-12-22 23:48:49 +00:00
|
|
|
|
|
|
|
gcc9Stdenv.mkDerivation rec {
|
|
|
|
pname = "libdnf";
|
2021-05-04 22:09:11 +00:00
|
|
|
version = "0.62.0";
|
2020-12-22 23:48:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rpm-software-management";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-05-04 22:09:11 +00:00
|
|
|
sha256 = "sha256-Se15VmBbzt/NASjrA25RdpHDVIG/GOSqn6ibpBe752g=";
|
2020-12-22 23:48:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
gettext
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
check
|
|
|
|
gpgme
|
|
|
|
openssl
|
|
|
|
json_c
|
|
|
|
libsmartcols
|
|
|
|
libyaml
|
|
|
|
libmodulemd
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
sqlite
|
|
|
|
libsolv
|
|
|
|
librepo
|
|
|
|
rpm
|
|
|
|
];
|
|
|
|
|
|
|
|
# See https://github.com/NixOS/nixpkgs/issues/107430
|
|
|
|
prePatch = ''
|
|
|
|
cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake cmake/modules/
|
|
|
|
'';
|
|
|
|
|
|
|
|
# See https://github.com/NixOS/nixpkgs/issues/107428
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace "enable_testing()" "" \
|
|
|
|
--replace "add_subdirectory(tests)" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DWITH_GTKDOC=OFF"
|
|
|
|
"-DWITH_HTML=OFF"
|
|
|
|
"-DWITH_BINDINGS=OFF"
|
|
|
|
"-DWITH_ZCHUNK=OFF"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-12-22 23:48:49 +00:00
|
|
|
description = "Package management library.";
|
|
|
|
homepage = "https://github.com/rpm-software-management/libdnf";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
maintainers = with maintainers; [ rb2k ];
|
|
|
|
};
|
|
|
|
}
|