1 { lib, stdenv, fetchFromGitHub, cmake, pkg-config, bzip2, expat, glib, curl, libxml2, python3, rpm
2 , openssl, sqlite, file, xz, pcre, bash-completion, zstd, zchunk, libmodulemd
5 stdenv.mkDerivation rec {
6 pname = "createrepo_c";
9 src = fetchFromGitHub {
10 owner = "rpm-software-management";
11 repo = "createrepo_c";
13 sha256 = "sha256-rcrJjcWj+cTAE3k11Ynr7CQCOWD+rb60lcar0G2w06A=";
17 # Use the output directory to install the bash completions.
18 ./fix-bash-completion-path.patch
19 # Use the output directory to install the python modules.
20 ./fix-python-install-path.patch
24 substituteInPlace CMakeLists.txt \
25 --replace '@BASHCOMP_DIR@' "$out/share/bash-completion/completions"
26 substituteInPlace src/python/CMakeLists.txt \
27 --replace "@PYTHON_INSTALL_DIR@" "$out/${python3.sitePackages}"
30 nativeBuildInputs = [ cmake pkg-config rpm ];
32 buildInputs = [ bzip2 expat glib curl libxml2 python3 openssl sqlite file xz pcre bash-completion zstd zchunk libmodulemd ];
35 description = "C implementation of createrepo";
36 homepage = "https://rpm-software-management.github.io/createrepo_c/";
37 license = licenses.gpl2Plus;
38 platforms = platforms.unix;
39 maintainers = with maintainers; [ copumpkin ];