nixpkgs/pkgs/tools/package-management/libdnf/default.nix

65 lines
1.4 KiB
Nix
Raw Normal View History

2021-09-19 17:43:18 +02:00
{ lib, stdenv, fetchFromGitHub, cmake, gettext, pkg-config, gpgme, libsolv, openssl, check
2021-08-13 15:26:52 +02:00
, json_c, libmodulemd, libsmartcols, sqlite, librepo, libyaml, rpm, zchunk }:
2020-12-23 00:48:49 +01:00
2021-09-19 17:43:18 +02:00
stdenv.mkDerivation rec {
2020-12-23 00:48:49 +01:00
pname = "libdnf";
2022-03-12 13:46:24 +01:00
version = "0.66.0";
2020-12-23 00:48:49 +01:00
src = fetchFromGitHub {
owner = "rpm-software-management";
repo = pname;
rev = version;
2022-03-12 13:46:24 +01:00
sha256 = "sha256-fQyNm51roz6wn9QAE8/ZIrutyWP45xiKVHzn8n0LcwE=";
2020-12-23 00:48:49 +01:00
};
nativeBuildInputs = [
cmake
gettext
pkg-config
];
buildInputs = [
check
gpgme
openssl
json_c
libsmartcols
libyaml
libmodulemd
2021-08-13 15:26:52 +02:00
zchunk
2020-12-23 00:48:49 +01:00
];
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"
];
meta = with lib; {
2020-12-23 00:48:49 +01: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 ];
};
}