2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, zlib
|
|
|
|
, xz
|
|
|
|
, bzip2
|
|
|
|
, zchunk
|
|
|
|
, zstd
|
2023-01-11 07:51:40 +00:00
|
|
|
, expat
|
2023-07-15 17:15:38 +00:00
|
|
|
, withRpm ? !stdenv.isDarwin
|
|
|
|
, rpm
|
2023-01-11 07:51:40 +00:00
|
|
|
, db
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.7.24";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libsolv";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-07-15 17:15:38 +00:00
|
|
|
owner = "openSUSE";
|
|
|
|
repo = "libsolv";
|
|
|
|
rev = version;
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-UTVnGJO/9mQF9RwK75hh6IkoP1MwAlFaLCtdYU8uS34=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DENABLE_COMPLEX_DEPS=true"
|
2022-07-14 12:49:19 +00:00
|
|
|
"-DENABLE_LZMA_COMPRESSION=true"
|
|
|
|
"-DENABLE_BZIP2_COMPRESSION=true"
|
|
|
|
"-DENABLE_ZSTD_COMPRESSION=true"
|
|
|
|
"-DENABLE_ZCHUNK_COMPRESSION=true"
|
|
|
|
"-DWITH_SYSTEM_ZCHUNK=true"
|
2023-01-11 07:51:40 +00:00
|
|
|
] ++ lib.optionals withRpm [
|
2023-07-15 17:15:38 +00:00
|
|
|
"-DENABLE_COMPS=true"
|
2023-01-11 07:51:40 +00:00
|
|
|
"-DENABLE_PUBKEY=true"
|
|
|
|
"-DENABLE_RPMDB=true"
|
|
|
|
"-DENABLE_RPMDB_BYRPMHEADER=true"
|
|
|
|
"-DENABLE_RPMMD=true"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
nativeBuildInputs = [ cmake ninja pkg-config ];
|
2023-01-11 07:51:40 +00:00
|
|
|
buildInputs = [ zlib xz bzip2 zchunk zstd expat db ]
|
|
|
|
++ lib.optional withRpm rpm;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A free package dependency solver";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/openSUSE/libsolv";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
};
|
|
|
|
}
|