1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
bzip2,
glib,
curl,
libxml2,
python3,
rpm,
openssl,
sqlite,
file,
xz,
bash-completion,
zstd,
zchunk,
libmodulemd,
}:
stdenv.mkDerivation rec {
pname = "createrepo_c";
version = "1.2.1";
src = fetchFromGitHub {
owner = "rpm-software-management";
repo = "createrepo_c";
tag = version;
hash = "sha256-2mvU2F9rvG4FtDgq+M9VXWg+c+AsW/+tDPaEj7zVmQ0=";
};
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail 'execute_process(COMMAND ''${PKG_CONFIG_EXECUTABLE} --variable=completionsdir bash-completion OUTPUT_VARIABLE BASHCOMP_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)' "SET(BASHCOMP_DIR \"$out/share/bash-completion/completions\")"
substituteInPlace src/python/CMakeLists.txt \
--replace-fail "EXECUTE_PROCESS(COMMAND \''${PYTHON_EXECUTABLE} -c \"from sys import stdout; from sysconfig import get_path; stdout.write(get_path('platlib'))\" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)" "SET(PYTHON_INSTALL_DIR \"$out/${python3.sitePackages}\")"
'';
nativeBuildInputs = [
cmake
pkg-config
rpm
bash-completion
];
buildInputs = [
bzip2
glib
curl
libxml2
python3
openssl
sqlite
file
xz
zstd
zchunk
libmodulemd
];
meta = with lib; {
description = "C implementation of createrepo";
homepage = "https://rpm-software-management.github.io/createrepo_c/";
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ copumpkin ];
};
}
|