Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, gettext 6, pkg-config 7, gpgme 8, libsolv 9, openssl 10, check 11, json_c 12, libmodulemd 13, libsmartcols 14, sqlite 15, librepo 16, libyaml 17, rpm 18, zchunk 19}: 20 21stdenv.mkDerivation rec { 22 pname = "libdnf"; 23 version = "0.70.1"; 24 25 src = fetchFromGitHub { 26 owner = "rpm-software-management"; 27 repo = pname; 28 rev = "refs/tags/${version}"; 29 hash = "sha256-DQXyMzkYxqMxSIWEyBKb5vQfelfxLMy4QeHQPWJWx/o="; 30 }; 31 32 nativeBuildInputs = [ 33 cmake 34 gettext 35 pkg-config 36 ]; 37 38 buildInputs = [ 39 check 40 gpgme 41 openssl 42 json_c 43 libsmartcols 44 libyaml 45 libmodulemd 46 zchunk 47 ]; 48 49 propagatedBuildInputs = [ 50 sqlite 51 libsolv 52 librepo 53 rpm 54 ]; 55 56 # See https://github.com/NixOS/nixpkgs/issues/107430 57 prePatch = '' 58 cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake cmake/modules/ 59 ''; 60 61 postPatch = '' 62 # See https://github.com/NixOS/nixpkgs/issues/107428 63 substituteInPlace CMakeLists.txt \ 64 --replace "enable_testing()" "" \ 65 --replace "add_subdirectory(tests)" "" 66 67 # https://github.com/rpm-software-management/libdnf/issues/1518 68 substituteInPlace libdnf/libdnf.pc.in \ 69 --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ 70 ''; 71 72 cmakeFlags = [ 73 "-DWITH_GTKDOC=OFF" 74 "-DWITH_HTML=OFF" 75 "-DWITH_BINDINGS=OFF" 76 ]; 77 78 meta = with lib; { 79 description = "Package management library"; 80 homepage = "https://github.com/rpm-software-management/libdnf"; 81 changelog = "https://github.com/rpm-software-management/libdnf/releases/tag/${version}"; 82 license = licenses.gpl2Plus; 83 platforms = platforms.linux ++ platforms.darwin; 84 maintainers = with maintainers; [ rb2k ]; 85 }; 86}