2019-07-31 01:46:13 +00:00
|
|
|
{ stdenv
|
2020-04-05 01:54:09 +00:00
|
|
|
, substituteAll
|
2019-07-31 01:46:13 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-05 01:54:09 +00:00
|
|
|
, fetchpatch
|
|
|
|
, pkg-config
|
2019-07-31 01:46:13 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, gobject-introspection
|
|
|
|
, python3
|
|
|
|
, libyaml
|
2020-04-05 01:54:09 +00:00
|
|
|
, rpm
|
|
|
|
, file
|
2019-07-31 01:46:13 +00:00
|
|
|
, gtk-doc
|
2020-04-05 01:54:09 +00:00
|
|
|
, docbook-xsl-nons
|
|
|
|
, help2man
|
2019-07-31 01:46:13 +00:00
|
|
|
, docbook_xml_dtd_412
|
|
|
|
, glib
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libmodulemd";
|
2020-04-05 01:54:09 +00:00
|
|
|
version = "2.9.2";
|
2019-07-31 01:46:13 +00:00
|
|
|
|
2020-04-05 01:54:09 +00:00
|
|
|
outputs = [ "bin" "out" "dev" "devdoc" "man" "py" ];
|
2019-07-31 01:46:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fedora-modularity";
|
|
|
|
repo = pname;
|
|
|
|
rev = "${pname}-${version}";
|
2020-06-02 20:44:52 +00:00
|
|
|
sha256 = "0xl5f6a32hmli29b0rfp54h7vnagxdv9qa2r871mrgrr6fzjwvbn";
|
2019-07-31 01:46:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2020-04-05 01:54:09 +00:00
|
|
|
# Use proper glib devdoc path.
|
|
|
|
(substituteAll {
|
|
|
|
src = ./glib-devdoc.patch;
|
|
|
|
glib_devdoc = glib.devdoc;
|
|
|
|
})
|
|
|
|
|
|
|
|
# Install pygobject overrides to our prefix instead of python3 one.
|
2020-04-07 17:14:55 +00:00
|
|
|
# https://github.com/fedora-modularity/libmodulemd/pull/469
|
2020-04-05 01:54:09 +00:00
|
|
|
(fetchpatch {
|
2020-04-07 17:14:55 +00:00
|
|
|
url = "https://github.com/fedora-modularity/libmodulemd/commit/f72a4bea092f4d84cfc48a3e820eb10270e828d0.patch";
|
2020-06-02 20:44:52 +00:00
|
|
|
sha256 = "1rrf94q1yf98w6b9bm67mb6w6qv1zqi306iv1vzspvjhsqvzmzpg";
|
2020-04-07 17:14:55 +00:00
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/fedora-modularity/libmodulemd/commit/021ab08006b5cf601ce153174fdf403b910b8273.patch";
|
2020-06-02 20:44:52 +00:00
|
|
|
sha256 = "0z35jpnnzzb5bvmc2lglrpfnwarhky2jqmhq9avnnki22fdw89i6";
|
2020-04-05 01:54:09 +00:00
|
|
|
})
|
2019-07-31 01:46:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2020-04-05 01:54:09 +00:00
|
|
|
pkg-config
|
2019-07-31 01:46:13 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
gtk-doc
|
2020-04-05 01:54:09 +00:00
|
|
|
docbook-xsl-nons
|
|
|
|
help2man
|
2019-07-31 01:46:13 +00:00
|
|
|
docbook_xml_dtd_412
|
|
|
|
gobject-introspection
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libyaml
|
2020-04-05 01:54:09 +00:00
|
|
|
rpm
|
|
|
|
file # for libmagic
|
2019-07-31 01:46:13 +00:00
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Ddeveloper_build=false"
|
2020-04-07 17:14:55 +00:00
|
|
|
"-Dgobject_overrides_dir_py3=${placeholder "py"}/${python3.sitePackages}/gi/overrides"
|
2019-07-31 01:46:13 +00:00
|
|
|
];
|
|
|
|
|
2020-04-07 17:14:55 +00:00
|
|
|
postFixup = ''
|
|
|
|
# Python overrides depend our own typelibs and other packages
|
|
|
|
mkdir -p "$py/nix-support"
|
|
|
|
echo "$out ${python3.pkgs.pygobject3} ${python3.pkgs.six}" > "$py/nix-support/propagated-build-inputs"
|
|
|
|
'';
|
|
|
|
|
2019-07-31 01:46:13 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "C Library for manipulating module metadata files";
|
|
|
|
homepage = "https://github.com/fedora-modularity/libmodulemd";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|