depot/third_party/nixpkgs/pkgs/tools/package-management/libdnf/default.nix
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

64 lines
1.4 KiB
Nix

{ gcc9Stdenv, lib, stdenv, fetchFromGitHub, cmake, gettext, pkg-config, gpgme, libsolv, openssl, check
, json_c, libmodulemd, libsmartcols, sqlite, librepo, libyaml, rpm }:
gcc9Stdenv.mkDerivation rec {
pname = "libdnf";
version = "0.63.1";
src = fetchFromGitHub {
owner = "rpm-software-management";
repo = pname;
rev = version;
sha256 = "sha256-SwkqFSAl99fQoXT96BPRqKFqJg3HEziiT+jXcugPyxM=";
};
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"
];
meta = with lib; {
description = "Package management library.";
homepage = "https://github.com/rpm-software-management/libdnf";
license = licenses.gpl2Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ rb2k ];
};
}